]> git.rmz.io Git - dotfiles.git/commitdiff
zsh: print the dir when switch with ranger
authorSamir Benmendil <samir.benmendil@gmail.com>
Tue, 16 Dec 2014 14:44:00 +0000 (14:44 +0000)
committerSamir Benmendil <samir.benmendil@gmail.com>
Tue, 16 Dec 2014 14:44:00 +0000 (14:44 +0000)
zsh/lib/ranger.zsh

index 1fab1ae446a3c0ccac5af1981682277ef32b6d9f..64a94e63c583d476dc316dacffef70d16eac804b 100644 (file)
@@ -8,6 +8,7 @@ function ranger {
     /usr/bin/ranger --choosedir="$tempfile" "${@:-$(pwd)}"
     test -f "$tempfile" &&
     if [ "$(cat -- "$tempfile")" != "$(echo -n `pwd`)" ]; then
     /usr/bin/ranger --choosedir="$tempfile" "${@:-$(pwd)}"
     test -f "$tempfile" &&
     if [ "$(cat -- "$tempfile")" != "$(echo -n `pwd`)" ]; then
+        echo "$(cat "$tempfile")"
         cd -- "$(cat "$tempfile")"
     fi
     rm -f -- "$tempfile"
         cd -- "$(cat "$tempfile")"
     fi
     rm -f -- "$tempfile"