Created
September 28, 2014 13:50
-
-
Save ashwin/8d64074bbe2296818929 to your computer and use it in GitHub Desktop.
Change directory in fish after closing Ranger
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add this to your ~/.config/fish/config.fish | |
function ranger-cd | |
set tmpfile "/tmp/pwd-from-ranger" | |
ranger --choosedir=$tmpfile $argv | |
set rangerpwd (cat $tmpfile) | |
if test "$PWD" != $rangerpwd | |
cd $rangerpwd | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment