Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Doc/Zsh/contrib.yo
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,8 @@ The keystrokes read by tt(zkbd) are recorded as a definition for an
associative array named tt(key), written to a file in the subdirectory
tt(.zkbd) within either your tt(HOME) or tt(ZDOTDIR) directory. The name
of the file is composed from the tt(TERM), tt(VENDOR) and tt(OSTYPE)
parameters, joined by hyphens.
parameters, joined by hyphens. This may be overridden with the option tt(-d)
if you plan to keep it elsewhere: tt(zkbd -d /path/to/zkbd).

You may read this file into your tt(.zshrc) or another startup file with
the `tt(source)' or `tt(.)' commands, then reference the tt(key) parameter
Expand Down
4 changes: 3 additions & 1 deletion Functions/Misc/zkbd
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
emulate -RL zsh
local zkbd term key seq

zkbd=${ZDOTDIR:-$HOME}/.zkbd
zparseopts -D -F -- d:=rawdir || return 1
[[ -n "$rawdir" ]] && zkbd="${rawdir[2]}"
[[ ! -d "$zkbd" ]] && zkbd="${ZDOTDIR:-$HOME}/.zkbd"
[[ -d $zkbd ]] || mkdir $zkbd || return 1

trap 'unfunction getmbkey getseq; command rm -f $zkbd/$TERM.tmp' 0
Expand Down