diff options
| author | zachir <zachir@librem.one> | 2023-07-05 02:34:26 -0500 | 
|---|---|---|
| committer | zachir <zachir@librem.one> | 2023-07-05 02:34:26 -0500 | 
| commit | cc47caf5323249c699444f6503fced531feed81c (patch) | |
| tree | 9ea30654d751c6f3b897d8ba95a113bdef5b218f /sh/functions | |
| parent | 9066d8473564ac5d8f1e419085d5c9c2045e98a1 (diff) | |
Add function to not record veracrypt history in zsh
Diffstat (limited to 'sh/functions')
| -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  | 
