about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-11-22 13:31:14 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-11-22 13:31:14 +0000
commite37ffd5b702b6d219716716a8498cf07e1683546 (patch)
tree3d104a8eb3b6debb05f1ed87657072c368dc2b93
parent2450b27486797013032924792de846076e29552c (diff)
downloadzsh-e37ffd5b702b6d219716716a8498cf07e1683546.tar.gz
zsh-e37ffd5b702b6d219716716a8498cf07e1683546.tar.xz
zsh-e37ffd5b702b6d219716716a8498cf07e1683546.zip
zsh-workers/8722
-rw-r--r--Completion/Base/_arguments2
-rw-r--r--Completion/Core/_path_files14
-rw-r--r--Completion/User/_telnet2
-rw-r--r--Doc/Zsh/compsys.yo7
4 files changed, 20 insertions, 5 deletions
diff --git a/Completion/Base/_arguments b/Completion/Base/_arguments
index 43f5bb878..f7e1cdedd 100644
--- a/Completion/Base/_arguments
+++ b/Completion/Base/_arguments
@@ -199,7 +199,7 @@ if comparguments -i "$autod" "$@"; then
           comparguments -W line opt_args
           state="${${action[3,-1]##[ 	]#}%%[ 	]#}"
 	  if [[ -n "$usecc" ]]; then
-	    curcontext="$subc"
+	    curcontext="${oldcontext}:$subc"
 	  else
 	    context="$subc"
 	  fi
diff --git a/Completion/Core/_path_files b/Completion/Core/_path_files
index 41956d543..71ee3b218 100644
--- a/Completion/Core/_path_files
+++ b/Completion/Core/_path_files
@@ -110,9 +110,19 @@ orig="${PREFIX}${SUFFIX}"
    ( $#compstate[pattern_match] -ne 0 &&
      "${orig#\~}" != "${${orig#\~}:q}" ) ]] && menu=yes
 
-# If given no `-F' option, we want to use `fignore'.
+# If given no `-F' option, we want to use the `ignored-suffixes'-style.
 
-(( $#ignore )) || ignore=(-F fignore)
+if (( ! $#ignore )); then
+  if _style -a files ignored-suffixes ignore; then
+    ignore=(-F "( $ignore )")
+  else
+
+    # For now we still use the fignore parameter.
+    # This may be removed some day.
+
+    ignore=(-F fignore)
+  fi
+fi
 
 # Now let's have a closer look at the string to complete.
 
diff --git a/Completion/User/_telnet b/Completion/User/_telnet
index 7b86e544c..81780e171 100644
--- a/Completion/User/_telnet
+++ b/Completion/User/_telnet
@@ -73,7 +73,7 @@ ports)
   _wanted ports expl port &&
       _combination '' hosts-ports-users \
           ${opt_args[-l]:+users=${opt_args[-l]:q}} \
-          hosts="${line[2]:q}" \
+          hosts="${line[1]:q}" \
           ports "$expl[@]"
   ;;
 
diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo
index cd6b910cb..b7ab37163 100644
--- a/Doc/Zsh/compsys.yo
+++ b/Doc/Zsh/compsys.yo
@@ -867,7 +867,12 @@ completed for which pairs with the hostname from the line exist.
 )
 item(tt(hosts-ports-users))(
 Like tt(hosts-ports) but used for commands like tt(telnet) and
-containing strings of the form `var(host)tt(:)var(port)tt(:)var(user)' .
+containing strings of the form `var(host)tt(:)var(port)tt(:)var(user)'.
+)
+item(tt(ignored-suffixes))(
+This style is used with the tt(files) tag and gives suffixes of
+filenames to ignore. The matches ignored will only be completed when
+there are no other matches.
 )
 item(tt(insert-unambiguous))(
 This is used by the tt(_match) completer function. If it is set to