about summary refs log tree commit diff
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
parentaf79d23b955f1a5b1359aa9c71fbdba9dcf1d4e5 (diff)
downloadzsh-e364fb2139df94df3c4aac406e56b133d3e497b1.tar.gz
zsh-e364fb2139df94df3c4aac406e56b133d3e497b1.tar.xz
zsh-e364fb2139df94df3c4aac406e56b133d3e497b1.zip
insert redirection operators when expanding after one (14281)
-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"