1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-23 17:01:05 +02:00

48920: _pgrep: Address issues related to -f completion

This commit is contained in:
dana 2021-06-14 22:19:38 -05:00
parent 32450b7c81
commit c6603669a2
2 changed files with 8 additions and 2 deletions

View file

@ -1,5 +1,8 @@
2021-06-14 dana <dana@dana.is>
* 48920: Completion/Unix/Command/_pgrep: Address issues related to
-f completion
* 48920: Completion/Unix/Command/_pgrep: Clarify -x description
2021-06-13 Bart Schaefer <schaefer@zsh.org>

View file

@ -170,10 +170,13 @@ case $state in
ispat+="full "
fi
if (( ${+opt_args[-f]} )); then
local -a opts=( -lf )
[[ $OSTYPE == linux* ]] && opts=( -a )
local -a matches=( ${(f)"$(
_call_program process-args pgrep -lf ${${:-$PREFIX$SUFFIX}:-.\*}
_call_program process-args pgrep ${(@q)opts} -- \
${(q)${${:-$PREFIX$SUFFIX}:-.\*}}
)"} )
local -a displ=( "${${matches[@]//':'/'\:'}[@]/ /:}" )
local -a displ=( "${${matches[@]//:/\:}[@]/ /:}" )
matches=( "${matches[@]##<-> }" )
local desc=$ispat'process command line'