mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-26 16:40:29 +01:00
20222: turn on max function depth
plus unposted reference to this in README plus unposted neatening of 20219 history-pattern-search
This commit is contained in:
parent
b550cfe7e3
commit
ab899b76c7
6 changed files with 62 additions and 24 deletions
|
|
@ -5,15 +5,17 @@ local opt keys
|
|||
integer stat
|
||||
|
||||
while getopts "k:" opt; do
|
||||
case $opt in
|
||||
(k)
|
||||
keys=$OPTARG
|
||||
;;
|
||||
case $opt in
|
||||
# Read the given number of keys. This is a bit
|
||||
# ropey for more than a single key.
|
||||
(k)
|
||||
keys=$OPTARG
|
||||
;;
|
||||
|
||||
(*)
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
(*)
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
(( OPTIND > 1 )) && shift $(( OPTIND - 1 ))
|
||||
|
||||
|
|
@ -27,13 +29,13 @@ ${1:-? }"
|
|||
POSTDISPLAY=
|
||||
|
||||
if [[ -n $keys ]]; then
|
||||
zle -R
|
||||
read -k $keys
|
||||
stat=$?
|
||||
zle -R
|
||||
read -k $keys
|
||||
stat=$?
|
||||
else
|
||||
zle recursive-edit
|
||||
stat=$?
|
||||
(( stat )) || REPLY=$BUFFER
|
||||
zle recursive-edit
|
||||
stat=$?
|
||||
(( stat )) || REPLY=$BUFFER
|
||||
fi
|
||||
|
||||
LBUFFER=$savelbuffer
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue