Skip to content

Instantly share code, notes, and snippets.

@valosekj
Last active August 11, 2023 11:45
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save valosekj/601f2665602c43b378894e18d00b3ce1 to your computer and use it in GitHub Desktop.
Save valosekj/601f2665602c43b378894e18d00b3ce1 to your computer and use it in GitHub Desktop.
Fix ${HOME} variable

My zsh configuration and tips

This gist contains some essential commands and configurations which I have included in my config files on my MacOS and Linux machines.

NOTE: on Linux, it may be necessary to install zsh (e.g., sudo apt install zsh zplug)

NOTE on MacOS:

  • it is necessary to install nano from homebrew (using brew install nano)

  • git can be installed within Command Line Tools for Xcode from here

  • brew package manager can be installed by:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Make zsh your default shell:

chsh -s /bin/zsh

(then logout and login)

Note: If you cannot run chsh due to permissions, you can add zsh -l at the end of ~/.bashrc, see here

Location of zshrc

  • Linux: ~/.zshrc

  • MacOS: /etc/zshrc (but this looks like root's file), currently I use ~/.zshrc

Download oh-my-zsh:

Info

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

oh-my-zsh is installed into ~/.oh-my-zsh

plugins are located in ~/.oh-my-zsh/plugins

custom plugins (e.g. zsh-autosuggestions) are located in ~/.oh-my-zsh/custom/plugins

zsh-autosuggestions:

Download/Install zsh-autosuggestions

On Linux:

$ git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

Then add this plugin into your zshrc file

On MacOS:

$ brew install zsh-autosuggestions

Note: Follow the instructions to isntall brew.

Then add following line into zshrc file:

# Intel
source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh
# M1
source /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh

To ignore insecure completion, it is necessary to add following lines at the beginning of the zshrc config file:

ZSH_DISABLE_COMPFIX=true

# Use modern completion system using shell function compinit
# http://zsh.sourceforge.net/Doc/Release/Completion-System.html#Initialization
autoload -Uz compinit

# Silently ignore all insecure files and directories use the option
compinit -i

zsh-syntax-highlighting

Install syntax-highlighting

On Linux:

$ git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

Then add this plugin into your zshrc file

On MacOS:

brew install zsh-syntax-highlighting

Then add following line into zshrc file:

# Intel
source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
# M1
source /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh

Location of nanorc

  • Linux: ~/.nanorc

  • MacOS: ~/.nanorc

Location of .ssh/config:

  • Linux: ~/.ssh/config

  • MacOS: ~/.ssh/config

# ~/.nanorc file can be easily automatically created by following command
# command below adds all available language syntax highlighting, sets auto-indentation and shows number line
# description - https://askubuntu.com/a/538674
# select one
#NANO_PATH="/usr/local/share/nano/"
NANO_PATH="/usr/share/nano/"
# M1 and nano installed from brew
NANO_PATH=/opt/homebrew/Cellar/nano/5.9/share/nano
find ${NANO_PATH} -iname "*.nanorc" -exec echo include {} \; >> ~/.nanorc; echo -e "\nset constantshow" >> ~/.nanorc; echo "set autoindent" >> ~/.nanorc

Install iPython on MacOS

$ pip3 install ipython

Import favourite libraries during iPython startup:

Navigate to iPython startup config directory:

$ cd ~/.ipython/profile_default/startup

Create a new script start.py with following lines:

import os
import pandas as pd
import numpy as np

# Pandas options
pd.options.display.max_columns = 30
pd.options.display.max_rows = 20

from IPython import get_ipython
ipython = get_ipython()

# If in ipython, load autoreload extension
if 'ipython' in globals():
    print('\nWelcome to IPython!')
    ipython.magic('load_ext autoreload')
    ipython.magic('autoreload 2')

print('Libraries have been loaded.')

Create iPython config file:

Config file is located in ~/.ipython/profile_default/ipython_config.py, example:

# iPython config file

# Set nano as a default editor for %edit command
c.InteractiveShell.editor = 'nano'

# Allow interactive plot displaying  
c.InteractiveShellApp.matplotlib = 'osx'

Example of config file - here

Load Git branch and show it in prompt (no need of oh-my-zsh)

In your .zshrc, put the lines below

# Load Git branch
autoload -Uz vcs_info
# Show git branch only in git directory, otherwise show nothing
# This function is executed before each prompt
precmd() { vcs_info }
# Format the vcs_info_msg_0_ variable
zstyle ':vcs_info:git:*' formats '[%b]'

# Allow substitutions in prompt
setopt PROMPT_SUBST

# Default prompt
# Colors https://medium.com/dev-genius/customize-the-macos-terminal-zsh-4cb387e4f447
PS1='%F{green}%n@%m%f:%F{blue}%~%F{cyan}${vcs_info_msg_0_}%F{blue}$%f '

Note - PS1 variable above is set for MacOS, for Linux, following PS1 looks better:

PS1='%F{76}%n@%m%f:%F{74}%~%F{cyan}${vcs_info_msg_0_}%F{74}$%f '

oh-my-zsh setup on a server (without sudo)

  1. Clone oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
  1. Clone zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions /home/GRAMES.POLYMTL.CA/p118175/.zsh/zsh-autosuggestions
  1. Copy desired .zshrc file to your ~/ directory

  2. Add the following line at the end of .bashrc:

zsh -l
  1. Deactivate default conda env
conda config --set auto_activate_base false

Install pyenv on MacOS

  1. Run following command in the CLI:
$ curl https://pyenv.run | bash

Then add following lines into your zshrc file:

# Define environment variable PYENV_ROOT
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"

# Enable shims and autocompletion
if command -v pyenv 1>/dev/null 2>&1;then
  eval "$(pyenv init -)"
fi

eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"

You can then check your $(pyenv root) variable:

$ echo $(pyenv root)

And install specific version of python:

$ pyenv install 3.7.0

.ssh/config file contains options for ssh command.

Example of .ssh/config file:

Host <name>
    HostName <host_name>
    User <user_name>
    Port <port_number>
    Identityfile <ssh_key>

Then you can type in your terminal simply $ ssh <name> and all options are passed from .ssh/config file.

History search

In your .zshrc, put the lines below

(NOTE: it is necessary to install percol by pip3 install percol)

function exists { which $1 &> /dev/null }

if exists percol; then
    function percol_select_history() {
        local tac
        exists gtac && tac="gtac" || { exists tac && tac="tac" || { tac="tail -r" } }
        BUFFER=$(fc -l -n 1 | eval $tac | percol --query "$LBUFFER")
        CURSOR=$#BUFFER         # move cursor
        zle -R -c               # refresh
    }

    zle -N percol_select_history
    bindkey '^R' percol_select_history
fi
# zshrc config file for UNIX and MacOS without using oh-my-zsh, Jan Valosek
# OS specific commands are in case statement below
case `uname` in
Darwin)
# commands for OS X
# Default prompt
PS1='%F{green}%n@%m%f:%F{blue}%~$%f '
# Alias for colorful ls output
alias ls='CLICOLOR_FORCE=1 ls -G'
# nano from homebrew
alias nano='/usr/local/bin/nano'
;;
Linux)
# commands for Linux
# Default prompt - color codes - https://jonasjacek.github.io/colors/
PS1='%F{76}%n@%m%f:%F{74}%~$%f '
# Alias for colorful ls output
alias ls='ls --color=always'
# Allow moving between words in zsh command using ctrl + left_arrow and ctrl + right_arrow
# (on MacOS, moving can be done by option + left_arrow or right_arrow)
bindkey -e
bindkey '^[[1;5C' forward-word
bindkey '^[[1;5D' backward-word
# Permissions
umask 0002
;;
esac
# Keep 5000 lines of history within the shell and save it to ~/.zsh_history:
HISTSIZE=5000
SAVEHIST=5000
HISTFILE=~/.zsh_history
# aliases for ls command
alias ll='ls -lath'
alias grep='grep --color=always'
#alias lh='ls -lath | head -10'
#alias lt='ls -lath | tail -10'
# Functions for ls in combination with head or tail commands with definable number of output lines
function lh { if [ "$#" -eq 0 ];then num=10;else num=${1};fi; ls -lath | head -${num} }
function lt { if [ "$#" -eq 0 ];then num=10;else num=${1};fi; ls -lath | tail -${num} }
# count items in directory
alias countf='ls -1 $1 | wc -l'
# alias for which command (to have same behaviour as in bash)
# https://stackoverflow.com/a/14196212/12605960
alias which='whence -p'
# aliases for venv workflow
# https://www.youtube.com/watch?v=fTs7yAIUiso
alias ae='deactivate &> /dev/null; source ./venv/bin/activate'
alias de='deactivate'
# Use modern completion system
autoload -Uz compinit
compinit
# Uncomment the following line to enable command auto-correction
setopt correct
# Auto cd
setopt autocd
# Shared history between terminals
setopt sharehistory
# History substitution (replacement of !!)
setopt HIST_VERIFY
# Case insensitive globbing
setopt NO_CASE_GLOB
# Disable globbing - https://unix.stackexchange.com/a/310553
setopt +o nomatch
# zshrc config file for UNIX and MacOS with using oh-my-zsh, Jan Valosek
# many another useful aliases can be found here - https://www.cyberciti.biz/tips/bash-aliases-mac-centos-linux-unix.html
# OS specific commands are in case statement below
case `uname` in
Darwin)
# commands for OS X
# Default prompt
PS1='%F{green}%n@%m%f:%F{cyan}%~$%f '
# Alias for colorful ls output
alias ls='CLICOLOR_FORCE=1 ls -G'
# nano from homebrew
alias nano='${HOMEBREW_CELLAR}/nano/7.1/bin/nano'
# Path to oh-my-zsh installation
export ZSH="$HOME/.oh-my-zsh"
# oh-my-zsh plugins
# Standard plugins can be found in $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
plugins=(
git
git-prompt
percol
timer
)
# Load autosuggestions zsh plugin installed by brew
source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh
# Load syntax-highlighting zsh plugin installed by brew
source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
;;
Linux)
# commands for Linux
# Default prompt - color codes - https://jonasjacek.github.io/colors/
PS1='%F{76}%n@%m%f:%F{74}%~$%f '
# Alias for colorful ls output
alias ls='ls --color=always'
# alias for venv creation
alias ce='virtualenv -p /usr/bin/python3 venv; echo "venv was created successfully"'
# Allow moving between words in zsh command using ctrl + left_arrow and ctrl + right_arrow
# (on MacOS, moving can be done by option + left_arrow or right_arrow)
bindkey -e
bindkey '^[[1;5C' forward-word
bindkey '^[[1;5D' backward-word
# Permissions
umask 0002
# Path to oh-my-zsh installation
export ZSH="/home/valosek/.oh-my-zsh"
# Fix folder permission issue cause by zsh plugin zsh-autosuggestions
# https://github.com/ohmyzsh/ohmyzsh/issues/6835#issuecomment-390216875
ZSH_DISABLE_COMPFIX=true
# oh-my-zsh plugins
# Standard plugins can be found in $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
plugins=(
git-prompt
percol
timer
zsh-autosuggestions
zsh-syntax-highlighting
)
;;
esac
HYPHEN_INSENSITIVE="true"
source $ZSH/oh-my-zsh.sh
# Speed up pasting into zsh terminal
# https://github.com/zsh-users/zsh-autosuggestions/issues/238#issuecomment-389324292
# https://github.com/zsh-users/zsh-autosuggestions/issues/238
pasteinit() {
OLD_SELF_INSERT=${${(s.:.)widgets[self-insert]}[2,3]}
zle -N self-insert url-quote-magic # I wonder if you'd need `.url-quote-magic`?
}
pastefinish() {
zle -N self-insert $OLD_SELF_INSERT
}
zstyle :bracketed-paste-magic paste-init pasteinit
zstyle :bracketed-paste-magic paste-finish pastefinish
# Oh-my-zsh logo
typeset -a RAINBOW
RAINBOW=(
"$(printf '\033[38;5;196m')"
"$(printf '\033[38;5;202m')"
"$(printf '\033[38;5;226m')"
"$(printf '\033[38;5;082m')"
"$(printf '\033[38;5;021m')"
"$(printf '\033[38;5;093m')"
"$(printf '\033[38;5;163m')"
)
RESET=$(printf '\033[0m')
printf '%s %s__ %s %s %s %s %s__ %s\n' $RAINBOW $RESET
printf '%s ____ %s/ /_ %s ____ ___ %s__ __ %s ____ %s_____%s/ /_ %s\n' $RAINBOW $RESET
printf '%s / __ \\%s/ __ \\ %s / __ `__ \\%s/ / / / %s /_ / %s/ ___/%s __ \\ %s\n' $RAINBOW $RESET
printf '%s/ /_/ /%s / / / %s / / / / / /%s /_/ / %s / /_%s(__ )%s / / / %s\n' $RAINBOW $RESET
printf '%s\\____/%s_/ /_/ %s /_/ /_/ /_/%s\\__, / %s /___/%s____/%s_/ /_/ %s\n' $RAINBOW $RESET
printf '%s %s %s %s /____/ %s %s %s %s\n' $RAINBOW $RESET
printf '\n'
# Keep 5000 lines of history within the shell and save it to ~/.zsh_history:
HISTSIZE=5000
SAVEHIST=5000
HISTFILE=~/.zsh_history
# Aliases
#alias ll='ls -lath --color=auto'
alias ll='ls -lath'
alias grep='grep --color=auto'
#alias lh='ls -lath | head -10'
#alias lt='ls -lath | tail -10'
# Functions for ls in combination with head or tail commands with definable number of output lines
function lh { if [ "$#" -eq 0 ];then num=10;else num=${1};fi; ls -lath | head -${num} }
function lt { if [ "$#" -eq 0 ];then num=10;else num=${1};fi; ls -lath | tail -${num} }
alias ff='fsleyes_preset'
function column_tsv { column -t -s $'\t' ${1} }
function column_csv { column -t -s $';' ${1} }
# Functions for fetching useful nifti image header info using SCT
function header { sct_image -i ${1} -header }
function orientation { sct_image -i ${1} -header | grep -E qform_[xyz] | awk '{printf "%s", substr($2, 1, 1)}' }
function pixdim { sct_image -i ${1} -header | grep pixdim }
# Alias for which command (to have same behaviour as in bash)
# https://stackoverflow.com/a/14196212/12605960
alias which='whence -p'
# Preserve user enviroment and config (i.e., zsh shell) also for root user
# https://github.com/ohmyzsh/ohmyzsh/issues/5311#issuecomment-240106715
alias suroot='sudo -E -s'
# aliases for venv workflow
# https://www.youtube.com/watch?v=fTs7yAIUiso
#alias ae='deactivate &> /dev/null; source ./venv/bin/activate'
#alias de='deactivate'
# aliases for venv workflow
# https://www.youtube.com/watch?v=fTs7yAIUiso
# activate venv
alias ae='deactivate &> /dev/null; source ./venv/bin/activate'
# deactivate venv
alias de='deactivate'
# create venv (and install requirements if requirements.txt file exists)
function ce { python3 -m venv venv; echo "venv was created successfully"; if [ -f requirements.txt ]; then echo "requirements.txt file found, installing dependencies..."; source ./venv/bin/activate; pip install -r requirements.txt;fi }
# Use modern completion system
autoload -Uz compinit
# Ignore insecure directories
compinit -i # Ignore insecure directories
# Uncomment the following line to enable command auto-correction
setopt correct
# Auto cd
setopt autocd
# Shared history between terminals
setopt sharehistory
# History substitution (replacement of !!)
setopt HIST_VERIFY
# Case insensitive globbing
setopt NO_CASE_GLOB
# Disable globbing - https://unix.stackexchange.com/a/310553
setopt +o nomatch
# Prevent perl language warning (https://gist.github.com/madeagency/79dc86e8aa09aa512af5)
export LC_CTYPE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
# SCT
export PATH="/usr/local/sct/bin:$PATH"
export SCT_DIR=/usr/local/sct
export MPLBACKEND=Agg
# FSL
export PATH=$PATH:/usr/local/fsl/bin
export FSLDIR=/usr/local/fsl
. ${FSLDIR}/etc/fslconf/fsl.sh
echo "FSLDIR $FSLDIR"
echo "SCT_DIR $SCT_DIR"
# Python 3.8 installed from homebrew
export PATH="/opt/homebrew/opt/python@3.8/bin:$PATH"
# Print currently used python version into CLI
echo "python3 $(python3 -V)"
# Minimalistic .zshrc for servers (without sudo)
# prompt is modified at the end of the file to add git branch into prompt
# Default prompt - color codes - https://jonasjacek.github.io/colors/
PS1='%F{76}%n@%m%f:%F{74}%~$%f '
# Path to oh-my-zsh installation
export ZSH="$HOME/.oh-my-zsh"
# Load autosuggestions zsh plugin
source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
plugins=(
git
git-prompt
percol
timer
)
HYPHEN_INSENSITIVE="true"
source $ZSH/oh-my-zsh.sh
ZSH_DISABLE_COMPFIX=true
# Use modern completion system using shell function compinit
# http://zsh.sourceforge.net/Doc/Release/Completion-System.html#Initialization
autoload -Uz compinit
# Silently ignore all insecure files and directories use the option
compinit -i
# Keep 5000 lines of history within the shell and save it to ~/.zsh_history:
HISTSIZE=5000
SAVEHIST=5000
HISTFILE=~/.zsh_history
# Allow moving between words in zsh command using Ctrl+left_arrow and Ctrl+right_arrow
bindkey -e
bindkey '^[[1;5C' forward-word
bindkey '^[[1;5D' backward-word
# Fix numeric keypad - https://superuser.com/a/830850
# 0 . Enter
bindkey -s "^[Op" "0"
bindkey -s "^[On" "."
bindkey -s "^[OM" "^M"
# 1 2 3
bindkey -s "^[Oq" "1"
bindkey -s "^[Or" "2"
bindkey -s "^[Os" "3"
# 4 5 6
bindkey -s "^[Ot" "4"
bindkey -s "^[Ou" "5"
bindkey -s "^[Ov" "6"
# 7 8 9
bindkey -s "^[Ow" "7"
bindkey -s "^[Ox" "8"
bindkey -s "^[Oy" "9"
# Aliases
alias ls='ls --color=always'
alias ll='ls -lath --color=auto'
alias grep='grep --color=auto'
#alias lh='ls -lath | head -10'
#alias lt='ls -lath | tail -10'
# Functions for ls in combination with head or tail commands with definable number of output lines
function lh { if [ "$#" -eq 0 ];then num=10;else num=${1};fi; ls -lath | head -${num} }
function lt { if [ "$#" -eq 0 ];then num=10;else num=${1};fi; ls -lath | tail -${num} }
#alias ff='fsleyes_preset &> /dev/null'
alias ff='fsleyes_preset'
alias fin='fslinfo'
function column_tsv { column -t -s $'\t' ${1} }
function column_csv { column -t -s $',' ${1} }
function column_semicolon { column -t -s $';' ${1} }
# Preserve user enviroment and config (i.e., zsh shell) also for root user
# https://github.com/ohmyzsh/ohmyzsh/issues/5311#issuecomment-240106715
alias suroot='sudo -E -s'
# aliases for venv workflow
# https://www.youtube.com/watch?v=fTs7yAIUiso
alias ae='deactivate &> /dev/null; source ./venv/bin/activate'
alias de='deactivate'
alias ce='virtualenv -p /usr/bin/python3 venv; echo "venv was created successfully"'
# alias for nano text editor
alias nn='nano'
# Use modern completion system
autoload -Uz compinit
compinit -i # Ignore insecure directories
# Uncomment the following line to enable command auto-correction
setopt correct
# Auto cd
setopt autocd
# Shared history between terminals
setopt sharehistory
# History substitution (replacement of !!)
setopt HIST_VERIFY
# Case insensitive globbing
setopt NO_CASE_GLOB
# Disable globbing - https://unix.stackexchange.com/a/310553
setopt +o nomatch
function exists { which $1 &> /dev/null }
if exists percol; then
function percol_select_history() {
local tac
exists gtac && tac="gtac" || { exists tac && tac="tac" || { tac="tail -r" } }
BUFFER=$(fc -l -n 1 | eval $tac | percol --query "$LBUFFER")
CURSOR=$#BUFFER # move cursor
zle -R -c # refresh
}
zle -N percol_select_history
bindkey '^R' percol_select_history
fi
# Oh-my-zsh logo
typeset -a RAINBOW
RAINBOW=(
"$(printf '\033[38;5;196m')"
"$(printf '\033[38;5;202m')"
"$(printf '\033[38;5;226m')"
"$(printf '\033[38;5;082m')"
"$(printf '\033[38;5;021m')"
"$(printf '\033[38;5;093m')"
"$(printf '\033[38;5;163m')"
)
RESET=$(printf '\033[0m')
printf '%s %s__ %s %s %s %s %s__ %s\n' $RAINBOW $RESET
printf '%s ____ %s/ /_ %s ____ ___ %s__ __ %s ____ %s_____%s/ /_ %s\n' $RAINBOW $RESET
printf '%s / __ \\%s/ __ \\ %s / __ `__ \\%s/ / / / %s /_ / %s/ ___/%s __ \\ %s\n' $RAINBOW $RESET
printf '%s/ /_/ /%s / / / %s / / / / / /%s /_/ / %s / /_%s(__ )%s / / / %s\n' $RAINBOW $RESET
printf '%s\\____/%s_/ /_/ %s /_/ /_/ /_/%s\\__, / %s /___/%s____/%s_/ /_/ %s\n' $RAINBOW $RESET
printf '%s %s %s %s /____/ %s %s %s %s\n' $RAINBOW $RESET
# SPINALCORDTOOLBOX (installed on 2022-11-19 20:51:03)
export PATH="${HOME}/code/spinalcordtoolbox/bin:$PATH"
export SCT_DIR=${HOME}/code/spinalcordtoolbox
echo "SCT_DIR $SCT_DIR"
# Print currently used python version into CLI
echo "python3 $(python3 -V)"
echo "python $(python -V)"
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/usr/local/miniforge3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/usr/local/miniforge3/etc/profile.d/conda.sh" ]; then
. "/usr/local/miniforge3/etc/profile.d/conda.sh"
else
export PATH="/usr/local/miniforge3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
# nnUNet - UPDATE ME IF NECESARRY!!!
export nnUNet_raw="${HOME}/data/nnunetv2/nnUNet_raw"
export nnUNet_preprocessed="${HOME}/data/nnunetv2/nnUNet_preprocessed"
export nnUNet_results="${HOME}/data/nnunetv2/nnUNet_results"
@burkotOndrej
Copy link

Path for FSL does not work in some cases. While using this specification of FSL path, I was not able to run FSLeyes (app crashed due to some errors). I replaced this part of code (lines 168-170) as follows:

source fsl-activator 6.0.5

Now I'm able to run FSL wtihouth any errors.

@valosekj
Copy link
Author

valosekj commented Nov 8, 2022

Regarding the .nanorc, the following "single-line" solution might be working as well:

echo 'include "/usr/local/share/nano/*.nanorc"' >> ~/.nanorc

source

@valosekj
Copy link
Author

valosekj commented Nov 8, 2022

Path for FSL does not work in some cases. While using this specification of FSL path, I was not able to run FSLeyes (app crashed due to some errors). I replaced this part of code (lines 168-170) as follows:

source fsl-activator 6.0.5

Now I'm able to run FSL without any errors.

Yeah, you are right, on some machines, /usr/local/fsl/ points to an older version of FSL (5.0.9 or 5.0.10) with nonworking FSLeyes. The workaround with fsl-activator is correct.

@valosekj
Copy link
Author

Regarding the .nanorc, the following "single-line" solution might be working as well:

echo 'include "/usr/local/share/nano/*.nanorc"' >> ~/.nanorc

source

Okay, this seems not to be working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment