about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Base/Completer/_expand23
2 files changed, 17 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index 4c09106f8..d111a78f9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-05-09  Oliver Kiddle  <opk@zsh.org>
+
+	* 14281: Completion/Base/Completer/_expand: insert redirection
+	operators when expanding after a redirection operator.
+
 2001-05-09  Peter Stephenson  <pws@csr.com>
 
 	* unposted: Config/version.mk: 4.0.1-pre-4.
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"