]> git.rmz.io Git - dotfiles.git/blobdiff - zsh/lib/ranger.zsh
nvim: add FPP copyright snippet
[dotfiles.git] / zsh / lib / ranger.zsh
index 64a94e63c583d476dc316dacffef70d16eac804b..f59c7f550bf8aaadee97fd7ae0ef43ec03562f65 100644 (file)
@@ -3,9 +3,10 @@ if (( ! $+commands[ranger] )); then
 fi
 
 # Auto cd into rangers directory
 fi
 
 # Auto cd into rangers directory
+ranger_cmd=$(whence -p ranger)
 function ranger {
     tempfile=$(mktemp /tmp/ranger-dirXXX)
 function ranger {
     tempfile=$(mktemp /tmp/ranger-dirXXX)
-    /usr/bin/ranger --choosedir="$tempfile" "${@:-$(pwd)}"
+    $ranger_cmd --choosedir="$tempfile" "${@:-$(pwd)}"
     test -f "$tempfile" &&
     if [ "$(cat -- "$tempfile")" != "$(echo -n `pwd`)" ]; then
         echo "$(cat "$tempfile")"
     test -f "$tempfile" &&
     if [ "$(cat -- "$tempfile")" != "$(echo -n `pwd`)" ]; then
         echo "$(cat "$tempfile")"