mirror of
				git://git.code.sf.net/p/zsh/code
				synced 2025-10-27 04:40:59 +01:00 
			
		
		
		
	48891: Fix pgrep/pkill -f completion
Old completion produced false positives & took too much screen space.
This commit is contained in:
		
							parent
							
								
									e732073415
								
							
						
					
					
						commit
						891d361572
					
				
					 2 changed files with 12 additions and 2 deletions
				
			
		|  | @ -166,8 +166,15 @@ case $state in | |||
|       ispat="" | ||||
|     fi | ||||
|     if (( ${+opt_args[-f]} )); then | ||||
|       _wanted process-args expl $ispat'process command line' \ | ||||
| 	compadd ${${(f)"$(_call_program process-args ps -A -o args=)"}% *} | ||||
|       local -a matches=( ${(f)"$( | ||||
|               _call_program process-args pgrep -lf ${${:-$PREFIX$SUFFIX}:-.\*} | ||||
|           )"} ) | ||||
|       local -a displ=( "${${matches[@]//':'/'\:'}[@]/ /:}" ) | ||||
|       matches=( "${matches[@]##<-> }" ) | ||||
| 
 | ||||
|       local desc=$ispat'process command line' | ||||
|       _description process-args expl "$desc" | ||||
|       _describe -t process-args "$desc" displ matches "$@" -U "$expl[@]" | ||||
|     else | ||||
|       _wanted processes-names expl $ispat'process name' _process_names -a -t | ||||
|     fi | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue