summary refs log tree commit diff
path: root/Completion/Zsh
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Zsh')
-rw-r--r--Completion/Zsh/Type/_globquals20
-rw-r--r--Completion/Zsh/Type/_history_modifiers3
2 files changed, 9 insertions, 14 deletions
diff --git a/Completion/Zsh/Type/_globquals b/Completion/Zsh/Type/_globquals
index 0262c8b6f..0ad71b72c 100644
--- a/Completion/Zsh/Type/_globquals
+++ b/Completion/Zsh/Type/_globquals
@@ -56,24 +56,18 @@ while [[ -n $PREFIX ]]; do
 
     (d)
     # complete/skip device
-    if [[ -z $PREFIX ]]; then
-      _message device ID
+    if ! compset -p '[[:digit:]]##'; then
+      _message "device ID"
       return
     fi
-    # It's pointless trying to complete the device.
-    # Simply assume it's done.
-    compset -p '[[:digit:]]##'
     ;;
 
     (l)
     # complete/skip link count
-    if [[ PREFIX = ([-+]|) ]]; then
-      _message link count
+    if ! compset -P '([-+]|)[[:digit:]]##'; then
+      _message "link count"
       return
     fi
-    # It's pointless trying to complete the link count.
-    # Simply assume it's done.
-    compset -P '([-+]|)[[:digit:]]##'
     ;;
 
     (u)
@@ -162,9 +156,9 @@ while [[ -n $PREFIX ]]; do
     # complete/skip range: check for closing bracket
     if ! compset -P "(-|)[[:digit:]]##(,(-|)[[:digit:]]##|)]"; then
       if compset -P "(-|)[[:digit:]]##,"; then
-	_message end of range
+	_message "end of range"
       else
-	_message start of range
+	_message "start of range"
       fi
       return
     fi
@@ -172,7 +166,7 @@ while [[ -n $PREFIX ]]; do
 
     (:)
     # complete modifiers and don't stop completing them
-    _history_modifiers
+    _history_modifiers q
     return
     ;;
   esac
diff --git a/Completion/Zsh/Type/_history_modifiers b/Completion/Zsh/Type/_history_modifiers
index 085867159..3d112e1e6 100644
--- a/Completion/Zsh/Type/_history_modifiers
+++ b/Completion/Zsh/Type/_history_modifiers
@@ -53,9 +53,10 @@ while true; do
     [[ -n $PREFIX ]] && return 1
 
     list=("\::modifier")
-    [[ $type = g ]] && list+=("):end of qualifiers")
+    [[ $type = q ]] && list+=("):end of qualifiers")
     # strictly we want a normal suffix if end of qualifiers
     _describe -t delimiters "delimiter" list -Q -S ''
+    return
   else
     list=(
       "s:substitute string"