aboutsummaryrefslogtreecommitdiffstats
path: root/misc/quitcd
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-12-19 18:33:27 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-12-19 18:33:27 +0530
commitc24efdbedbd3325e2a890810830f84fd3979d851 (patch)
tree611f14707d94cfb51b47009aa1bb1c51927b46ea /misc/quitcd
parentcf388649b9cd6fba38b9c0dca49c29bad3b6f737 (diff)
downloadnnn-c24efdbedbd3325e2a890810830f84fd3979d851.tar.gz
Simplify QuitCD scripts
Diffstat (limited to 'misc/quitcd')
-rw-r--r--misc/quitcd/quitcd.bash4
-rw-r--r--misc/quitcd/quitcd.csh1
-rw-r--r--misc/quitcd/quitcd.fish4
-rw-r--r--misc/quitcd/quitcd.zsh4
4 files changed, 10 insertions, 3 deletions
diff --git a/misc/quitcd/quitcd.bash b/misc/quitcd/quitcd.bash
index 43908db..203e613 100644
--- a/misc/quitcd/quitcd.bash
+++ b/misc/quitcd/quitcd.bash
@@ -7,7 +7,8 @@ n ()
fi
# The default behaviour is to cd on quit (nnn checks if NNN_TMPFILE is set)
- # To cd on quit only on ^G, export NNN_TMPFILE after the call to nnn
+ # To cd on quit only on ^G, remove the "export" as in:
+ # NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd"
# NOTE: NNN_TMPFILE is fixed, should not be modified
export NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd"
@@ -15,6 +16,7 @@ n ()
# stty start undef
# stty stop undef
# stty lwrap undef
+ # stty lnext undef
nnn "$@"
diff --git a/misc/quitcd/quitcd.csh b/misc/quitcd/quitcd.csh
index 5341b19..9f6213e 100644
--- a/misc/quitcd/quitcd.csh
+++ b/misc/quitcd/quitcd.csh
@@ -9,5 +9,6 @@ set NNN_TMPFILE=~/.config/nnn/.lastd
# stty start undef
# stty stop undef
# stty lwrap undef
+# stty lnext undef
alias n 'nnn -fis; source "$NNN_TMPFILE"; rm -f "$NNN_TMPFILE"'
diff --git a/misc/quitcd/quitcd.fish b/misc/quitcd/quitcd.fish
index 5b9cd62..ea6a1bd 100644
--- a/misc/quitcd/quitcd.fish
+++ b/misc/quitcd/quitcd.fish
@@ -10,7 +10,8 @@ function n --description 'support nnn quit and change directory'
end
# The default behaviour is to cd on quit (nnn checks if NNN_TMPFILE is set)
- # To cd on quit only on ^G, export NNN_TMPFILE after the call to nnn
+ # To cd on quit only on ^G, remove the "-x" as in:
+ # set NNN_TMPFILE "$XDG_CONFIG_HOME/nnn/.lastd"
# NOTE: NNN_TMPFILE is fixed, should not be modified
if test -n "$XDG_CONFIG_HOME"
set -x NNN_TMPFILE "$XDG_CONFIG_HOME/nnn/.lastd"
@@ -22,6 +23,7 @@ function n --description 'support nnn quit and change directory'
# stty start undef
# stty stop undef
# stty lwrap undef
+ # stty lnext undef
nnn $argv
diff --git a/misc/quitcd/quitcd.zsh b/misc/quitcd/quitcd.zsh
index 43908db..203e613 100644
--- a/misc/quitcd/quitcd.zsh
+++ b/misc/quitcd/quitcd.zsh
@@ -7,7 +7,8 @@ n ()
fi
# The default behaviour is to cd on quit (nnn checks if NNN_TMPFILE is set)
- # To cd on quit only on ^G, export NNN_TMPFILE after the call to nnn
+ # To cd on quit only on ^G, remove the "export" as in:
+ # NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd"
# NOTE: NNN_TMPFILE is fixed, should not be modified
export NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd"
@@ -15,6 +16,7 @@ n ()
# stty start undef
# stty stop undef
# stty lwrap undef
+ # stty lnext undef
nnn "$@"