summaryrefslogtreecommitdiff
path: root/Functions/Zle/read-from-minibuffer
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2004-07-30 11:09:16 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2004-07-30 11:09:16 +0000
commitab899b76c790d1cb13b76716d4d99b6bd7ac983c (patch)
tree9685f177c31645e5394be3236bd4deecb3f0b8af /Functions/Zle/read-from-minibuffer
parentb550cfe7e382c7704965a166af81933f1ac50d4b (diff)
downloadzsh-ab899b76c790d1cb13b76716d4d99b6bd7ac983c.tar.gz
zsh-ab899b76c790d1cb13b76716d4d99b6bd7ac983c.zip
20222: turn on max function depth
plus unposted reference to this in README plus unposted neatening of 20219 history-pattern-search
Diffstat (limited to 'Functions/Zle/read-from-minibuffer')
-rw-r--r--Functions/Zle/read-from-minibuffer32
1 files changed, 17 insertions, 15 deletions
diff --git a/Functions/Zle/read-from-minibuffer b/Functions/Zle/read-from-minibuffer
index c3848ae9f..ba75cbdce 100644
--- a/Functions/Zle/read-from-minibuffer
+++ b/Functions/Zle/read-from-minibuffer
@@ -5,15 +5,17 @@ local opt keys
integer stat
while getopts "k:" opt; do
- case $opt in
- (k)
- keys=$OPTARG
- ;;
-
- (*)
- return 1
- ;;
- esac
+ 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
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