]> Sergey Matveev's repositories - nnn.git/commitdiff
Update scripts
authorArun Prakash Jana <engineerarun@gmail.com>
Sat, 29 Apr 2017 06:39:26 +0000 (12:09 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Sat, 29 Apr 2017 13:50:00 +0000 (19:20 +0530)
README.md
misc/quitcd/quitcd.bash
misc/quitcd/quitcd.fish
misc/quitcd/quitcd.zsh

index fbb26fa97c0159ba7c3980566539a4ad9fbcedea..c4f58c176908ed6fbad9acba5da9594f6c5a8e0d 100644 (file)
--- a/README.md
+++ b/README.md
@@ -59,7 +59,7 @@ Have fun with it! PRs are welcome. Check out [#1](https://github.com/jarun/nnn/i
 - Super-easy navigation with roll-over at edges
 - Jump HOME or back to the last visited directory (as usual!)
 - Jump to initial dir, chdir prompt, cd ..... (with . as PWD)
-- Search-as-you-type
+- Filter directory contents with search-as-you-type
 - Desktop opener integration to handle mime types
 - Customizable bash script nlay to handle known file types
 - Disk usage analyzer mode
index 94accd6d29c792e71d9d85c043c1be09e2af19c4..71abf1fd5f910f733755fc7f219a3e690f5b31cb 100644 (file)
@@ -2,7 +2,12 @@ export NNN_TMPFILE="/tmp/nnn"
 
 n()
 {
-        nnn -d
+        if [ -n "$1" ]; then
+                nnn -d "$1"
+        else
+                nnn -d
+        fi
+
         if [ -f $NNN_TMPFILE ]; then
                 . $NNN_TMPFILE
                 rm $NNN_TMPFILE
index 35551c8efe4e54c7f5443a614535c9e85a5f38de..f4380099117ade73032c11a139fd6c7cb4356bc9 100644 (file)
@@ -1,7 +1,8 @@
 export NNN_TMPFILE="/tmp/nnn"
 
 function n --description 'support nnn quit and change directory'
-        nnn -d
+        nnn -d $argv[1]
+
         if test -e $NNN_TMPFILE
                 . $NNN_TMPFILE
                 rm $NNN_TMPFILE
index 94accd6d29c792e71d9d85c043c1be09e2af19c4..71abf1fd5f910f733755fc7f219a3e690f5b31cb 100644 (file)
@@ -2,7 +2,12 @@ export NNN_TMPFILE="/tmp/nnn"
 
 n()
 {
-        nnn -d
+        if [ -n "$1" ]; then
+                nnn -d "$1"
+        else
+                nnn -d
+        fi
+
         if [ -f $NNN_TMPFILE ]; then
                 . $NNN_TMPFILE
                 rm $NNN_TMPFILE