diff options
author | Nathaniel <natemaia10@gmail.com> | 2018-09-05 20:42:13 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-05 20:42:13 -0700 |
commit | e79b08089ba6d91c18905e58f7c4749300473b98 (patch) | |
tree | d99749a084ae731b60171230ccb131d41bdf462a /examples/bash_automatic_cd.sh | |
parent | 573bc3aff2c6881928fae984280ff03ad5360fe7 (diff) | |
parent | cc6d9a0b19d250215b822342436e8e81e71c4b4d (diff) | |
download | ranger-e79b08089ba6d91c18905e58f7c4749300473b98.tar.gz |
Merge branch 'master' into patch-4
Diffstat (limited to 'examples/bash_automatic_cd.sh')
-rw-r--r-- | examples/bash_automatic_cd.sh | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/examples/bash_automatic_cd.sh b/examples/bash_automatic_cd.sh index bdac5757..04b58e24 100644 --- a/examples/bash_automatic_cd.sh +++ b/examples/bash_automatic_cd.sh @@ -6,12 +6,10 @@ # the last visited one after ranger quits. # To undo the effect of this function, you can type "cd -" to return to the # original directory. -# -# On OS X 10 or later, replace `usr/bin/ranger` with `/usr/local/bin/ranger`. function ranger-cd { tempfile="$(mktemp -t tmp.XXXXXX)" - /usr/bin/ranger --choosedir="$tempfile" "${@:-$(pwd)}" + ranger --choosedir="$tempfile" "${@:-$(pwd)}" test -f "$tempfile" && if [ "$(cat -- "$tempfile")" != "$(echo -n `pwd`)" ]; then cd -- "$(cat "$tempfile")" |