summaryrefslogtreecommitdiffstats
path: root/Functions
diff options
context:
space:
mode:
Diffstat (limited to 'Functions')
-rw-r--r--Functions/Misc/zkbd10
1 files changed, 8 insertions, 2 deletions
diff --git a/Functions/Misc/zkbd b/Functions/Misc/zkbd
index 1065a84f1..493cc65ea 100644
--- a/Functions/Misc/zkbd
+++ b/Functions/Misc/zkbd
@@ -9,9 +9,15 @@
}
emulate -RL zsh
-local zkbd term key seq
+local zkbd override term key seq
-zkbd=${ZDOTDIR:-$HOME}/.zkbd
+zparseopts -D -F -- d:=override || return 1
+
+if (( $#override )); then
+ zkbd=$override[2]
+else
+ zkbd=${ZDOTDIR:-$HOME}/.zkbd
+fi
[[ -d $zkbd ]] || mkdir $zkbd || return 1
trap 'unfunction getmbkey getseq; command rm -f $zkbd/$TERM.tmp' 0