diff options
author | zachir <zachir@librem.one> | 2023-07-05 02:34:26 -0500 |
---|---|---|
committer | zachir <zachir@librem.one> | 2023-07-05 02:35:19 -0500 |
commit | 27e7b2894e8ce3908975440d17340a3dec140ee7 (patch) | |
tree | 90b40afb6afc174b1ee0bafd0ced71f18ee085ae | |
parent | cecfb2cfbc905849deed67f55463fbf5d1eb2ce8 (diff) |
Add function to not record veracrypt history in zsh
-rw-r--r-- | sh/functions | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sh/functions b/sh/functions index cbf40ce..3c73fb7 100644 --- a/sh/functions +++ b/sh/functions @@ -26,6 +26,18 @@ mvcd () { mv $@ && cd `ntharg $# "$@"` } +if [[ "$SHELL" =~ .*zsh$ ]]; then + zshaddhistory () { + emulate -L zsh + if [[ $1 != *"veracrypt"* ]]; then + print -sr -- "${1%%$'\n'}" + fc -p + else + return 1 + fi + } +fi + scd () { if [ "$1" = "" ]; then cd $HOME |