From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: zsh-users@sunsite.auc.dk
Subject: Re: kill and wait completion
Date: Sun, 19 Sep 1999 23:08:46 +0000 [thread overview]
Message-ID: <990919230846.ZM8526@candle.brasslantern.com> (raw)
In-Reply-To: <mvbogeyiukn.fsf@phobos.lrde.epita.fr>
On Sep 19, 9:12pm, pollux wrote:
} Subject: kill and wait completion
}
} Shouldn't `_kill' and `_wait' completion functions split
} `$compconfig[ps_args]' and `$compconfig[ps_listargs]' at spaces ?
Possibly, but not by using setopt sh_word_split.
And if those two should do it, then so should _gdb.
This patch is _instead_ of zsh-users/2609.
Index: Completion/Builtins/_kill
===================================================================
RCS file: /extra/cvsroot/zsh/zsh-3.1/Completion/Builtins/_kill,v
retrieving revision 1.8
diff -u -r1.8 _kill
--- _kill 1999/09/15 15:31:26 1.8
+++ _kill 1999/09/19 23:07:14
@@ -10,9 +10,9 @@
_description expl job
compgen "$expl[@]" -P '%' -j && ret=0
- list=("${(@Mr:COLUMNS-1:)${(f@)$(ps ${compconfig[ps_listargs]:-$compconfig[ps_args]} 2>/dev/null)}[2,-1]:#[ ]#${PREFIX}[0-9]#${SUFFIX}[ ]*}")
+ list=("${(@Mr:COLUMNS-1:)${(f@)$(ps ${=compconfig[ps_listargs]:-$=compconfig[ps_args]} 2>/dev/null)}[2,-1]:#[ ]#${PREFIX}[0-9]#${SUFFIX}[ ]*}")
_description expl 'process ID'
- compadd "$expl[@]" -ld list - ${${${(f)"$(ps $compconfig[ps_args] 2>/dev/null)"}[2,-1]## #}%% *} &&
+ compadd "$expl[@]" -ld list - ${${${(f)"$(ps $=compconfig[ps_args] 2>/dev/null)"}[2,-1]## #}%% *} &&
ret=0
return ret
Index: Completion/Builtins/_wait
===================================================================
RCS file: /extra/cvsroot/zsh/zsh-3.1/Completion/Builtins/_wait,v
retrieving revision 1.7
diff -u -r1.7 _wait
--- _wait 1999/09/15 15:31:26 1.7
+++ _wait 1999/09/19 23:07:14
@@ -15,8 +15,8 @@
_description expl job
compgen "$expl[@]" -P '%' -j && ret=0
-list=("${(@Mr:COLUMNS-1:)${(f)$(ps ${compconfig[ps_listargs]:-$compconfig[ps_args]} 2>/dev/null)}[2,-1]:#[ ]#${PREFIX}[0-9]#${SUFFIX}[ ]*}")
+list=("${(@Mr:COLUMNS-1:)${(f)$(ps ${=compconfig[ps_listargs]:-$=compconfig[ps_args]} 2>/dev/null)}[2,-1]:#[ ]#${PREFIX}[0-9]#${SUFFIX}[ ]*}")
_description expl 'process ID'
-compadd "$expl[@]" -ld list - ${${${(f)"$(ps $compconfig[ps_args] 2>/dev/null)"}[2,-1]## #}%% *} && ret=0
+compadd "$expl[@]" -ld list - ${${${(f)"$(ps $=compconfig[ps_args] 2>/dev/null)"}[2,-1]## #}%% *} && ret=0
return ret
Index: Completion/User/_gdb
===================================================================
RCS file: /extra/cvsroot/zsh/zsh-3.1/Completion/User/_gdb,v
retrieving revision 1.7
diff -u -r1.7 _gdb
--- _gdb 1999/09/15 15:31:35 1.7
+++ _gdb 1999/09/19 23:07:14
@@ -47,9 +47,9 @@
if [[ $#w -gt 1 ]]; then
_files && ret=0
_description expl 'process ID'
- list=("${(F)${(@Mr:COLUMNS-1:)${(f)$(ps ${compconfig[ps_listargs]:-$compconfig[ps_args]} 2>/dev/null)}[2,-1]:#[ ]#${PREFIX}[0-9]#${SUFFIX}[ ]*${w[1]:t}}}
+ list=("${(F)${(@Mr:COLUMNS-1:)${(f)$(ps ${=compconfig[ps_listargs]:-$=compconfig[ps_args]} 2>/dev/null)}[2,-1]:#[ ]#${PREFIX}[0-9]#${SUFFIX}[ ]*${w[1]:t}}}
")
- compadd "$expl[@]" -ld list - ${${${(M)${(f)"$(ps $compconfig[ps_args] 2>/dev/null)"}:#*${w[1]:t}*}## #}%% *} && ret=0
+ compadd "$expl[@]" -ld list - ${${${(M)${(f)"$(ps $=compconfig[ps_args] 2>/dev/null)"}:#*${w[1]:t}*}## #}%% *} && ret=0
return ret
else
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
prev parent reply other threads:[~1999-09-19 23:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-09-19 19:12 pollux
1999-09-19 23:08 ` Bart Schaefer [this message]
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=990919230846.ZM8526@candle.brasslantern.com \
--to=schaefer@candle.brasslantern.com \
--cc=zsh-users@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).