From e37ffd5b702b6d219716716a8498cf07e1683546 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Mon, 22 Nov 1999 13:31:14 +0000 Subject: zsh-workers/8722 --- Completion/Base/_arguments | 2 +- Completion/Core/_path_files | 14 ++++++++++++-- Completion/User/_telnet | 2 +- Doc/Zsh/compsys.yo | 7 ++++++- 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 -- cgit 1.4.1