summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorMark Blakeney <mark.blakeney@bullet-systems.net>2018-08-19 14:04:04 +1000
committerMark Blakeney <mark.blakeney@bullet-systems.net>2018-08-19 14:06:05 +1000
commit89b0c60b69f341a954d898eab031330fb1e1679a (patch)
treee4bdffc0cb7f04a41ea5ad6f106d734b01937f51 /examples
parente202207de110009ba9e4eb964ecbd58c4f063c31 (diff)
downloadranger-89b0c60b69f341a954d898eab031330fb1e1679a.tar.gz
Remove hard code of ranger path
Hard coding the path of ranger prohibits the bash_automatic_cd.sh script from working when the user has installed ranger in a different path such as in /usr/local/bin/, or ~/.local/bin/ etc.
Diffstat (limited to 'examples')
-rw-r--r--examples/bash_automatic_cd.sh4
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")"