diff options
author | rabite <rabite@posteo.de> | 2019-04-06 17:31:43 +0200 |
---|---|---|
committer | rabite <rabite@posteo.de> | 2019-04-06 17:37:06 +0200 |
commit | 6d879a6cee2a3831eb292063d32854b1d080c1af (patch) | |
tree | bffd552859c8c88960d802c77ce10dfcfcbd54f0 | |
parent | 405b3d1ecca8a7e688eeb9c2dc1ff5091455c934 (diff) |
add hunter_cd.sh
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | extra/hunter_cd.sh | 6 |
2 files changed, 8 insertions, 0 deletions
@@ -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: diff --git a/extra/hunter_cd.sh b/extra/hunter_cd.sh new file mode 100644 index 0000000..6d73be1 --- /dev/null +++ b/extra/hunter_cd.sh @@ -0,0 +1,6 @@ +function hunter() { + env hunter + test -e ~/.hunter_cwd && + source ~/.hunter_cwd && + rm ~/.hunter_cwd && cd $HUNTER_CWD +} |