aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuangxiong Lin <[email protected]>2022-11-13 00:15:33 +0800
committerGuangxiong Lin <[email protected]>2022-11-13 00:15:33 +0800
commit03b1f7fac8f5dbe44494f08c773b2372ce0846ea (patch)
treee21e33a065981df0e397b851bcca11330fdf538a
parent6482a4004af7d66a800a97e8281a6019da4df4b9 (diff)
downloaddotfiles-03b1f7fac8f5dbe44494f08c773b2372ce0846ea.tar.gz
dotfiles-03b1f7fac8f5dbe44494f08c773b2372ce0846ea.tar.bz2
dotfiles-03b1f7fac8f5dbe44494f08c773b2372ce0846ea.zip
Support quitcd for nnn
-rwxr-xr-x.nnnrc9
1 files changed, 7 insertions, 2 deletions
diff --git a/.nnnrc b/.nnnrc
index 8f12cc2..3250cf5 100755
--- a/.nnnrc
+++ b/.nnnrc
@@ -4,8 +4,13 @@ if [ ! -d $HOME/.config/nnn/plugins ]; then
curl -Ls https://raw.githubusercontent.com/jarun/nnn/master/plugins/getplugs | sh
fi
+# To support cd on quit (Ctrl-G)
+# NOTE: It will add a function `n` and ONLY work when typing `n` instead
+# of `nnn`.
+if [ -f /usr/share/nnn/quitcd/quitcd.bash_zsh ]; then
+ source /usr/share/nnn/quitcd/quitcd.bash_zsh
+fi
+
export NNN_PLUG='f:fzcd;v:imgview;j:autojump;p:preview-tui'
[ -f /usr/bin/trash ] && export NNN_TRASH=1
export NNN_FIFO=/tmp/nnn.fifo
-
-alias n="nnn"