diff options
author | hut <hut@lavabit.com> | 2013-03-09 18:48:02 +0100 |
---|---|---|
committer | hut <hut@lavabit.com> | 2013-03-09 18:48:02 +0100 |
commit | d2c7d024290ee95afa418975c728ad64172dcfec (patch) | |
tree | eea0659eab7bb0c7b9cc2026468c840d7f22a5c9 /examples/bash_automatic_cd.sh | |
parent | 62af277734f05f27f20467393c9d997012ddd2b4 (diff) | |
download | ranger-d2c7d024290ee95afa418975c728ad64172dcfec.tar.gz |
move examples to doc/examples
Diffstat (limited to 'examples/bash_automatic_cd.sh')
-rw-r--r-- | examples/bash_automatic_cd.sh | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/examples/bash_automatic_cd.sh b/examples/bash_automatic_cd.sh deleted file mode 100644 index 8d72c553..00000000 --- a/examples/bash_automatic_cd.sh +++ /dev/null @@ -1,21 +0,0 @@ -# Compatible with ranger 1.4.2 through 1.6.* -# -# Automatically change the directory in bash after closing ranger -# -# This is a bash function for .bashrc to automatically change the directory to -# the last visited one after ranger quits. -# To undo the effect of this function, you can type "cd -" to return to the -# original directory. - -function ranger-cd { - tempfile='/tmp/chosendir' - /usr/bin/ranger --choosedir="$tempfile" "${@:-$(pwd)}" - test -f "$tempfile" && - if [ "$(cat -- "$tempfile")" != "$(echo -n `pwd`)" ]; then - cd -- "$(cat "$tempfile")" - fi - rm -f -- "$tempfile" -} - -# This binds Ctrl-O to ranger-cd: -bind '"\C-o":"ranger-cd\C-m"' |