From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: PATCH: ignored-suffixes style
Date: Mon, 22 Nov 1999 14:28:42 +0100 (MET) [thread overview]
Message-ID: <199911221328.OAA05856@beta.informatik.hu-berlin.de> (raw)
This adds the `ignored-suffixes' style which can be used to replace
the `fignore' array (that one is still used but maybe we will remove
it someday).
Then there was a typo in `_telnet' and `_arguments' didn't set
`curcontext' correctly for `-C'.
Bye
Sven
diff -u -r oldcompletion/Base/_arguments Completion/Base/_arguments
--- oldcompletion/Base/_arguments Mon Nov 22 11:40:02 1999
+++ Completion/Base/_arguments Mon Nov 22 14:13:01 1999
@@ -199,7 +199,7 @@
comparguments -W line opt_args
state="${${action[3,-1]##[ ]#}%%[ ]#}"
if [[ -n "$usecc" ]]; then
- curcontext="$subc"
+ curcontext="${oldcontext}:$subc"
else
context="$subc"
fi
diff -u -r oldcompletion/Core/_path_files Completion/Core/_path_files
--- oldcompletion/Core/_path_files Mon Nov 22 11:40:09 1999
+++ Completion/Core/_path_files Mon Nov 22 14:20:13 1999
@@ -110,9 +110,19 @@
( $#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 -u -r oldcompletion/User/_telnet Completion/User/_telnet
--- oldcompletion/User/_telnet Mon Nov 22 11:40:15 1999
+++ Completion/User/_telnet Mon Nov 22 14:13:32 1999
@@ -73,7 +73,7 @@
_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 -u olddoc/Zsh/compsys.yo Doc/Zsh/compsys.yo
--- olddoc/Zsh/compsys.yo Mon Nov 22 11:39:27 1999
+++ Doc/Zsh/compsys.yo Mon Nov 22 14:26:30 1999
@@ -867,7 +867,12 @@
)
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
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
next reply other threads:[~1999-11-22 13:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-11-22 13:28 Sven Wischnowsky [this message]
1999-11-22 16:40 ` Bart Schaefer
1999-11-23 8:54 Sven Wischnowsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=199911221328.OAA05856@beta.informatik.hu-berlin.de \
--to=wischnow@informatik.hu-berlin.de \
--cc=zsh-workers@sunsite.auc.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).