add hunter_cd.sh

This commit is contained in:
rabite 2019-04-06 17:31:43 +02:00
parent 405b3d1ecc
commit 6d879a6cee
2 changed files with 8 additions and 0 deletions

View File

@ -39,6 +39,8 @@ hunter reads $XDG_CONFIG_HOME/hunter/config at startup. There are two options, w
animation=on
show_hidden=off
## Drop into hunter cwd on quit
To change the directory of your shell when quitting hunter with Q you need to source extra/hunter_cd.sh, which is a wrapper that runs hunter and checks for ~/.hunter_cwd after hunter exits and cd's into the contained directory if it exists.
Keybindings:

6
extra/hunter_cd.sh Normal file
View File

@ -0,0 +1,6 @@
function hunter() {
env hunter
test -e ~/.hunter_cwd &&
source ~/.hunter_cwd &&
rm ~/.hunter_cwd && cd $HUNTER_CWD
}