diff options
| -rw-r--r-- | .zshrc | 33 |
1 files changed, 33 insertions, 0 deletions
| @@ -165,5 +165,38 @@ function te { | |||
| 165 | 165 | ||
| 166 | source /home/yigit/.config/broot/launcher/bash/br | 166 | source /home/yigit/.config/broot/launcher/bash/br |
| 167 | 167 | ||
| 168 | n () | ||
| 169 | { | ||
| 170 | # Block nesting of nnn in subshells | ||
| 171 | if [ -n $NNNLVL ] && [ "${NNNLVL:-0}" -ge 1 ]; then | ||
| 172 | echo "nnn is already running" | ||
| 173 | return | ||
| 174 | fi | ||
| 175 | |||
| 176 | # The default behaviour is to cd on quit (nnn checks if NNN_TMPFILE is set) | ||
| 177 | # To cd on quit only on ^G, remove the "export" as in: | ||
| 178 | # NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd" | ||
| 179 | # NOTE: NNN_TMPFILE is fixed, should not be modified | ||
| 180 | NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd" | ||
| 181 | export NNN_OPENER=nuke | ||
| 182 | |||
| 183 | # Unmask ^Q (, ^V etc.) (if required, see `stty -a`) to Quit nnn | ||
| 184 | # stty start undef | ||
| 185 | # stty stop undef | ||
| 186 | # stty lwrap undef | ||
| 187 | # stty lnext undef | ||
| 188 | |||
| 189 | nnn -c "$@" | ||
| 190 | |||
| 191 | if [ -f "$NNN_TMPFILE" ]; then | ||
| 192 | . "$NNN_TMPFILE" | ||
| 193 | rm -f "$NNN_TMPFILE" > /dev/null | ||
| 194 | fi | ||
| 195 | } | ||
| 196 | |||
| 197 | export NNN_BMS='w:~/Nextcloud/personal_wiki;r:~/Nextcloud/remind' | ||
| 198 | export NNN_COLORS="2136" # use a different color for each context | ||
| 199 | export NNN_PLUG='d:dragdrop' | ||
| 200 | |||
| 168 | # Add RVM to PATH for scripting. Make sure this is the last PATH variable change. | 201 | # Add RVM to PATH for scripting. Make sure this is the last PATH variable change. |
| 169 | export PATH="$PATH:$HOME/.rvm/bin" | 202 | export PATH="$PATH:$HOME/.rvm/bin" |
