From e2cde6c3252247b4fa14117e2a4ef86efebbf948 Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Sat, 2 Sep 2017 11:15:10 +0530 Subject: Change name to scripts directory --- README.md | 2 +- misc/quitcd/quitcd.bash | 11 ----------- misc/quitcd/quitcd.fish | 10 ---------- misc/quitcd/quitcd.zsh | 11 ----------- scripts/quitcd/quitcd.bash | 11 +++++++++++ scripts/quitcd/quitcd.fish | 10 ++++++++++ scripts/quitcd/quitcd.zsh | 11 +++++++++++ 7 files changed, 33 insertions(+), 33 deletions(-) delete mode 100644 misc/quitcd/quitcd.bash delete mode 100644 misc/quitcd/quitcd.fish delete mode 100644 misc/quitcd/quitcd.zsh create mode 100644 scripts/quitcd/quitcd.bash create mode 100644 scripts/quitcd/quitcd.fish create mode 100644 scripts/quitcd/quitcd.zsh diff --git a/README.md b/README.md index 6ffe271..00ffcb8 100644 --- a/README.md +++ b/README.md @@ -302,7 +302,7 @@ To jump to the nth level parent, with PWD at level 0, use `n + 1` dot #### cd on quit -Pick the appropriate file for your shell from [misc/quitcd](https://github.com/jarun/nnn/tree/master/misc/quitcd) and add the contents to your shell's rc file. You'll need to spawn a new shell for the change to take effect. You should start `nnn` as `n` (or modify the function name to something else). +Pick the appropriate file for your shell from [scripts/quitcd](https://github.com/jarun/nnn/tree/master/scripts/quitcd) and add the contents to your shell's rc file. You'll need to spawn a new shell for the change to take effect. You should start `nnn` as `n` (or modify the function name to something else). As you might notice, `nnn` uses the environment variable `NNN_TMPFILE` to write the last visited directory path. You can change it. diff --git a/misc/quitcd/quitcd.bash b/misc/quitcd/quitcd.bash deleted file mode 100644 index dc83b23..0000000 --- a/misc/quitcd/quitcd.bash +++ /dev/null @@ -1,11 +0,0 @@ -export NNN_TMPFILE="/tmp/nnn" - -n() -{ - nnn "$@" - - if [ -f $NNN_TMPFILE ]; then - . $NNN_TMPFILE - rm $NNN_TMPFILE - fi -} diff --git a/misc/quitcd/quitcd.fish b/misc/quitcd/quitcd.fish deleted file mode 100644 index 079f33e..0000000 --- a/misc/quitcd/quitcd.fish +++ /dev/null @@ -1,10 +0,0 @@ -export NNN_TMPFILE="/tmp/nnn" - -function n --description 'support nnn quit and change directory' - nnn $argv - - if test -e $NNN_TMPFILE - . $NNN_TMPFILE - rm $NNN_TMPFILE - end -end diff --git a/misc/quitcd/quitcd.zsh b/misc/quitcd/quitcd.zsh deleted file mode 100644 index dc83b23..0000000 --- a/misc/quitcd/quitcd.zsh +++ /dev/null @@ -1,11 +0,0 @@ -export NNN_TMPFILE="/tmp/nnn" - -n() -{ - nnn "$@" - - if [ -f $NNN_TMPFILE ]; then - . $NNN_TMPFILE - rm $NNN_TMPFILE - fi -} diff --git a/scripts/quitcd/quitcd.bash b/scripts/quitcd/quitcd.bash new file mode 100644 index 0000000..dc83b23 --- /dev/null +++ b/scripts/quitcd/quitcd.bash @@ -0,0 +1,11 @@ +export NNN_TMPFILE="/tmp/nnn" + +n() +{ + nnn "$@" + + if [ -f $NNN_TMPFILE ]; then + . $NNN_TMPFILE + rm $NNN_TMPFILE + fi +} diff --git a/scripts/quitcd/quitcd.fish b/scripts/quitcd/quitcd.fish new file mode 100644 index 0000000..079f33e --- /dev/null +++ b/scripts/quitcd/quitcd.fish @@ -0,0 +1,10 @@ +export NNN_TMPFILE="/tmp/nnn" + +function n --description 'support nnn quit and change directory' + nnn $argv + + if test -e $NNN_TMPFILE + . $NNN_TMPFILE + rm $NNN_TMPFILE + end +end diff --git a/scripts/quitcd/quitcd.zsh b/scripts/quitcd/quitcd.zsh new file mode 100644 index 0000000..dc83b23 --- /dev/null +++ b/scripts/quitcd/quitcd.zsh @@ -0,0 +1,11 @@ +export NNN_TMPFILE="/tmp/nnn" + +n() +{ + nnn "$@" + + if [ -f $NNN_TMPFILE ]; then + . $NNN_TMPFILE + rm $NNN_TMPFILE + fi +} -- cgit v1.2.3-70-g09d2