Skip to content

Commit

Permalink
add ondir prompt hook function for fish shell
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Engel committed Oct 10, 2013
1 parent cb2f9f8 commit f1fc581
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 f1fc581

Please sign in to comment.