Created
June 2, 2020 08:06
-
-
Save udkyo/119e2ab73423fdbf961b8846c0b284a3 to your computer and use it in GitHub Desktop.
VSCode terminal history persistence helper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function hist { | |
[ ! -d ~/.history ] && mkdir ~/.history | |
chmod 700 ~/.history | |
name="history$(pwd | sed 's/\//-/g')" | |
echo "Using history file $name" | |
HISTFILE=~/.history/$name | |
HISTSIZE=4096 | |
SAVEHIST=4096 | |
setopt appendhistory | |
fc -R | |
} | |
hist |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment