mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-08 09:41:14 +02:00
remove unnecessary local
This commit is contained in:
parent
7ffa89ea7d
commit
00eb6e8a25
2 changed files with 6 additions and 3 deletions
|
@ -1,3 +1,7 @@
|
|||
2000-08-16 Sven Wischnowsky <wischnow@zsh.org>
|
||||
|
||||
* unposted: Completion/Builtins/_pids: remove unnecessary local parameter
|
||||
|
||||
2000-08-15 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* 12650: Completion/Builtins/_zmodload: don't lists aliases if
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# If given the `-m <pattern>' option, this tries to complete only pids
|
||||
# of processes whose command line match the `<pattern>'.
|
||||
|
||||
local out pids index list expl match desc listargs args all nm ret=1
|
||||
local out pids list expl match desc listargs args all nm ret=1
|
||||
|
||||
_tags processes || return 1
|
||||
|
||||
|
@ -27,8 +27,7 @@ desc="$out[1]"
|
|||
out=( "${(@M)out[2,-1]:#${~match}}" )
|
||||
|
||||
if [[ "$desc" = (#i)(|*[[:blank:]])pid(|[[:blank:]]*) ]]; then
|
||||
index="${#desc[1,(r)(#i)[[:blank:]]pid]}"
|
||||
pids=( "${(@)${(@M)out#${(l:index::?:)~:-}[^[:blank:]]#}##*[[:blank:]]}" )
|
||||
pids=( "${(@)${(@M)out#${(l.${#desc[1,(r)(#i)[[:blank:]]pid]}..?.)~:-}[^[:blank:]]#}##*[[:blank:]]}" )
|
||||
else
|
||||
pids=( "${(@)${(@M)out##[^0-9]#[0-9]#}##*[[:blank:]]}" )
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue