diff options
author | hut <hut@lepus.uberspace.de> | 2015-04-14 01:46:12 +0200 |
---|---|---|
committer | hut <hut@lepus.uberspace.de> | 2015-04-14 01:46:12 +0200 |
commit | eb9a75caa91f9315d14b17db14af4dfdd71fa82e (patch) | |
tree | 26e2d4002756a20666c6a2e6f8d148aafc990afe /doc/examples/bash_automatic_cd.sh | |
parent | 09b0f2f1044025c8d14d5f7296f43b495cf75ec3 (diff) | |
parent | 89146651e07830f15b59b5f076d61741747a0bea (diff) | |
download | ranger-1.7.0-emacs.tar.gz |
Merge branch 'master' into emacs v1.7.0-emacs
Diffstat (limited to 'doc/examples/bash_automatic_cd.sh')
-rw-r--r-- | doc/examples/bash_automatic_cd.sh | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/doc/examples/bash_automatic_cd.sh b/doc/examples/bash_automatic_cd.sh deleted file mode 100644 index 8d72c553..00000000 --- a/doc/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"' |