about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorOliver Kiddle <opk@users.sourceforge.net>2001-05-09 12:06:10 +0000
committerOliver Kiddle <opk@users.sourceforge.net>2001-05-09 12:06:10 +0000
commite364fb2139df94df3c4aac406e56b133d3e497b1 (patch)
treed1af2d04724d51b1f92df07c118a293150aff1e2 /Completion
parentaf79d23b955f1a5b1359aa9c71fbdba9dcf1d4e5 (diff)
downloadzsh-e364fb2139df94df3c4aac406e56b133d3e497b1.tar.gz
zsh-e364fb2139df94df3c4aac406e56b133d3e497b1.tar.xz
zsh-e364fb2139df94df3c4aac406e56b133d3e497b1.zip
insert redirection operators when expanding after one (14281)
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Base/Completer/_expand23
1 files changed, 12 insertions, 11 deletions
diff --git a/Completion/Base/Completer/_expand b/Completion/Base/Completer/_expand
index bf3ddefbf..ebb8a905b 100644
--- a/Completion/Base/Completer/_expand
+++ b/Completion/Base/Completer/_expand
@@ -150,17 +150,6 @@ if [[ -z "$compstate[insert]" ]] ;then
 else
   _tags all-expansions expansions original
 
-  if _requested all-expansions expl 'all expansions'; then
-    local disp dstr
-
-    if [[ "${#${exp}}" -ge COLUMNS ]]; then
-      disp=( -ld dstr )
-      dstr=( "${(r:COLUMNS-5:)exp} ..." )
-    else
-      disp=()
-    fi
-    compadd "$disp[@]" "$expl[@]" -UQ -qS "$suf" - "$exp"
-  fi
   if [[ $#exp -gt 1 ]] && _requested expansions; then
     local i j normal space dir
 
@@ -187,6 +176,18 @@ else
     (( $#space ))  && compadd "$expl[@]" -UQ -qS " " -a space
     (( $#normal )) && compadd "$expl[@]" -UQ -qS "" -a normal
   fi
+  if _requested all-expansions expl 'all expansions'; then
+    local disp dstr
+
+    if [[ "${#${exp}}" -ge COLUMNS ]]; then
+      disp=( -ld dstr )
+      dstr=( "${(r:COLUMNS-5:)exp} ..." )
+    else
+      disp=()
+    fi
+    [[ -o multios ]] && exp=($exp[1] $compstate[redirect]${^exp[2,-1]})
+    compadd "$disp[@]" "$expl[@]" -UQ -qS "$suf" - "$exp"
+  fi
 
   _requested original expl original && compadd "$expl[@]" -UQ - "$word"