Merge commit '12bbb66931feaac778ef4e47b67375ec9b58e839' as 'cde/programs/dtksh/ksh93'
This commit is contained in:
14
cde/programs/dtksh/ksh93/docs/ksh/functions/keybind.txt
Normal file
14
cde/programs/dtksh/ksh93/docs/ksh/functions/keybind.txt
Normal file
@@ -0,0 +1,14 @@
|
||||
typeset -A Keytable
|
||||
trap 'eval "${Keytable[${.sh.edchar}]}"' KEYBD
|
||||
function keybind # key action
|
||||
{
|
||||
typeset key=$(print -f "%q" "$2")
|
||||
case $# in
|
||||
2) Keytable[$1]='.sh.edchar=${.sh.edmode}'"$key"
|
||||
;;
|
||||
1) unset Keytable[$1]
|
||||
;;
|
||||
*) print -u2 "Usage: $0 key [action]"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
Reference in New Issue
Block a user