Skip to content

Commit

Permalink
Merge pull request #2 from mren/add-fish-shell-hook
Browse files Browse the repository at this point in the history
add ondir prompt hook function for fish shell
  • Loading branch information
alecthomas committed Oct 11, 2013
2 parents cb2f9f8 + f1fc581 commit ef71edc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ondir_prompt_hook.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# copy this file to ~/.config/fish/functions
function ondir_prompt_hook --on-event fish_prompt
if test ! -e "$OLDONDIRWD"; set -g OLDONDIRWD /; end;
if [ "$OLDONDIRWD" != "$PWD" ]; eval (ondir $OLDONDIRWD $PWD); end;
set -g OLDONDIRWD "$PWD";
end

0 comments on commit ef71edc

Please sign in to comment.