From: Tanaka Akira <akr@jaist.ac.jp>
To: zsh-workers@sunsite.auc.dk
Subject: PATCH: _apt, _socket and _perl_builtin_funcs
Date: 14 Sep 1999 09:19:07 +0900 [thread overview]
Message-ID: <rsqn1uqfipw.fsf@crane.jaist.ac.jp> (raw)
* _apt: support the form of option_prefix='...!command...'.
* _socket: more explanations.
* _perl_builtin_funcs: support systems that has no `-w' option with
`man'. (Solaris 7)
_perl_builtin_funcs does not work on Debian even now. Because the
result of `man -w perlfunc' is gziped file --
`/usr/man/man1/perlfunc.1p.gz'.
Index: Completion/Debian/_apt
===================================================================
RCS file: /projects/zsh/zsh/Completion/Debian/_apt,v
retrieving revision 1.1.1.4
diff -u -F^( -r1.1.1.4 _apt
--- _apt 1999/09/13 16:35:36 1.1.1.4
+++ _apt 1999/09/14 00:10:49
@@ -113,7 +113,7 @@
tmp2=($_ra_left${(M)^short_hasarg:#$~tmp1} $_ra_left${(M)^short_configfile:#$~tmp1} $_ra_left${(M)^short_arbitem:#$~tmp1})
compadd "$expl_opt[@]" -S= - $tmp2'
- comp_opt='[[ -prefix - || -z "$compconfig[option_prefix]" ]]'" && { $comp_short; $comp_long }"
+ comp_opt='[[ -prefix - || -z "$compconfig[option_prefix]" || "$compconfig[option_prefix]" = *\!$words[1]* ]]'" && { $comp_short; $comp_long }"
regex_short=()
regex_long=()
Index: Completion/User/_socket
===================================================================
RCS file: /projects/zsh/zsh/Completion/User/_socket,v
retrieving revision 1.1.1.3
diff -u -F^( -r1.1.1.3 _socket
--- _socket 1999/09/13 18:22:21 1.1.1.3
+++ _socket 1999/09/14 00:10:49
@@ -8,22 +8,42 @@
local state line expl
typeset -A options
+if [[ $CURRENT -eq 2 && (
+ -z "$compconfig[option_prefix]" ||
+ "$compconfig[option_prefix]" = *\!${words[1]}* ||
+ "$PREFIX" = -* ) ]]; then
+ _description expl option
+ compadd -M 'r:|[_-]=* r:|=*' "$expl[@]" - -version
+fi
+
_arguments -s \
- -{b,c,f,q,r,v,w} \
- -{s,l} \
- '-p:command:->command' \
+ '-b[background]' \
+ '-c[crlf]' \
+ '-f[fork]' \
+ '-q[quit]' \
+ '-r[read only]' \
+ '-v[verbose]' \
+ '-w[write only]' \
+ '-s[server]' \
+ '-l[loop]' \
+ '-p[program]:command:->command' \
':arg1:->arg1' \
':arg2:->arg2'
case "$state" in
command)
compset -q
- _normal
+ if [[ $CURRENT -eq 1 ]]; then
+ _command_names -e "$@"
+ else
+ _normal
+ fi
;;
arg1)
if (( $+options[-s] )); then
- _message 'port to listen'
+ _description expl 'port to listen'
+ _ports "$expl[@]"
else
_description expl 'host'
_combination socket_hosts_ports hosts "$expl[@]"
Index: Completion/User/_perl_builtin_funcs
===================================================================
RCS file: /projects/zsh/zsh/Completion/User/_perl_builtin_funcs,v
retrieving revision 1.1.1.1
diff -u -F^( -r1.1.1.1 _perl_builtin_funcs
--- _perl_builtin_funcs 1999/09/05 22:04:03 1.1.1.1
+++ _perl_builtin_funcs 1999/09/14 00:10:49
@@ -12,13 +12,13 @@
typeset -agU _perl_builtin_funcs
local perlfunc
- if perlfunc=`man -w perlfunc 2>&1`; then
+ if [[ -n "${perlfunc:=$(man -w perlfunc 2>/dev/null; print -l ${^manpath}/man1/perlfunc.1(N) {/usr/man,/usr/local/man}/man1/perlfunc.1(N))}" ]]; then
_perl_builtin_funcs=( `perl -lne '
$in_funcs++, next if /Alphabetical/; \
next unless $in_funcs; \
if (/^\.Ip "(\w+)/) { \
print $1 unless $func{$1}; $func{$1}++ \
- }' $perlfunc`
+ }' $=perlfunc`
)
else
echo "Couldn't find perlfunc man page; giving up."
--
Tanaka Akira
reply other threads:[~1999-09-14 0:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=rsqn1uqfipw.fsf@crane.jaist.ac.jp \
--to=akr@jaist.ac.jp \
--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).