Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: kill and wait completion
- X-seq: zsh-users 2610
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxxxxxx
- Subject: Re: kill and wait completion
- Date: Sun, 19 Sep 1999 23:08:46 +0000
- In-reply-to: <mvbogeyiukn.fsf@xxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <mvbogeyiukn.fsf@xxxxxxxxxxxxxxxxxxxx>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author