News for hackers. Stuff that matters.
Re:Yash: Yet Another Shell by nodar86 on Friday February 14, 2025 @08:45PM (#43055044)
You can do this with a zsh plugin: https://github.com/jimhester/per-directory-history
Re:Yash: Yet Another Shell by UncleOxidant on Saturday February 15, 2025 @12:51AM (#43056243)
This looks promising, thanks!
Re:Yash: Yet Another Shell by johnisgood on Saturday February 15, 2025 @11:14AM (#43059610)
For 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.