3 ms·
You can do this with a zsh plugin: https://github.com/jimhester/per-directory-history https://github.com/jimhester/per-directory-history
by nodar86 2y ago
You can do this with a zsh plugin: https://github.com/jimhester/per-directory-history https://github.com/jimhester/per-directory-history
- UncleOxidant 2y agoThis looks promising, thanks!
- johnisgood 2y agoFor bash, you may be able to do something like: function set_histfile { export HISTFILE="$HOME/.bash_history_$(pwd | tr '/' '_')" } PROMPT_COMMAND="set_histfile; $PROMPT_COMMAND" There may be other ways, but probably can't do it without PROMPT_COMMAND. Someone else mentioned "direnv", too.