]> Sergey Matveev's repositories - nnn.git/commitdiff
Simplify QuitCD scripts
authorArun Prakash Jana <engineerarun@gmail.com>
Thu, 19 Dec 2019 13:03:27 +0000 (18:33 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Thu, 19 Dec 2019 13:03:27 +0000 (18:33 +0530)
misc/quitcd/quitcd.bash
misc/quitcd/quitcd.csh
misc/quitcd/quitcd.fish
misc/quitcd/quitcd.zsh

index 43908dbdec8d194ce7334f634c4dbc502b9e7c46..203e613b40345b5f4120dd7499b79b3c90425fbe 100644 (file)
@@ -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 "$@"
 
index 5341b19a5f85ac2c8b3bcfd020e6241557d6499f..9f6213e22d67a251de6d62ad2864fef6b0ccd588 100644 (file)
@@ -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"'
index 5b9cd62b8e492f8ce74f35012ee0586ca3b2809b..ea6a1bdafcea66809ffdbd3583bf90d7e53e0d31 100644 (file)
@@ -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
 
index 43908dbdec8d194ce7334f634c4dbc502b9e7c46..203e613b40345b5f4120dd7499b79b3c90425fbe 100644 (file)
@@ -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 "$@"