From 27e7b2894e8ce3908975440d17340a3dec140ee7 Mon Sep 17 00:00:00 2001 From: zachir Date: Wed, 5 Jul 2023 02:34:26 -0500 Subject: Add function to not record veracrypt history in zsh --- sh/functions | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 -- cgit v1.2.3