diff options
author | zachir <zachir@librem.one> | 2023-07-05 02:34:26 -0500 |
---|---|---|
committer | zachir <zachir@librem.one> | 2023-08-10 21:31:35 -0500 |
commit | 1829bfa26b1ce61880e0212d67156b74fa9c83b0 (patch) | |
tree | 6954e812ca01b256d5ad2e0b6d3d89da8a8b41d9 /sh | |
parent | 56a6ef08f997baed47ac7a3e59e375cbee286d92 (diff) |
Add function to not record veracrypt history in zsh
Diffstat (limited to 'sh')
-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 |