Print the last 10 commands you ran in the current directory
- Add this function to your
.zshrc
function zshaddhistory() {
echo "${1%%$'\n'}⋮${PWD} " >> ~/.zsh_history_ext
}
-
Download or copy the
jog
script from this repo and place it somewhere in your$PATH
. -
Restart your current terminal sessions for changes to take effect.
exec $SHELL
-
Use
jog
whenever you find yourself lost and confused.
It's not possible to retroactively store the directory in which a command was run, so this tool will only work from this point forward.
Contributions and feature requests are welcome
- Add support for other shells: bash, fish.
- Automatically truncate
.zsh_history_ext
whenHISTSIZE
is surpassed