summaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
Diffstat (limited to 'sh')
-rw-r--r--sh/functions12
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