1
0
Fork 0
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:
Peter Stephenson 2004-07-30 11:09:16 +00:00
parent b550cfe7e3
commit ab899b76c7
6 changed files with 62 additions and 24 deletions

View file

@ -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