aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2017-04-29 12:09:26 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2017-04-29 19:20:00 +0530
commitbac4c27191b61f8d2cee4b7331b48cfba5b7b294 (patch)
treefa7d7432b8767feb54b366a8e5de9c460605ccb6
parent64d06ccaeea8eee1040748e16ddb875f552ee6dc (diff)
downloadnnn-bac4c27191b61f8d2cee4b7331b48cfba5b7b294.tar.gz
Update scripts
-rw-r--r--README.md2
-rw-r--r--misc/quitcd/quitcd.bash7
-rw-r--r--misc/quitcd/quitcd.fish3
-rw-r--r--misc/quitcd/quitcd.zsh7
4 files changed, 15 insertions, 4 deletions
diff --git a/README.md b/README.md
index fbb26fa..c4f58c1 100644
--- 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
diff --git a/misc/quitcd/quitcd.bash b/misc/quitcd/quitcd.bash
index 94accd6..71abf1f 100644
--- a/misc/quitcd/quitcd.bash
+++ b/misc/quitcd/quitcd.bash
@@ -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
diff --git a/misc/quitcd/quitcd.fish b/misc/quitcd/quitcd.fish
index 35551c8..f438009 100644
--- a/misc/quitcd/quitcd.fish
+++ b/misc/quitcd/quitcd.fish
@@ -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
diff --git a/misc/quitcd/quitcd.zsh b/misc/quitcd/quitcd.zsh
index 94accd6..71abf1f 100644
--- a/misc/quitcd/quitcd.zsh
+++ b/misc/quitcd/quitcd.zsh
@@ -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