mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-21 08:51:14 -03:00
Rewrite __fish_complete_proc
- No longer uses sed, sort, uniq, uname - Stop doing too-clever filtering (e.g. the kernel thread stuff never - really worked) - Don't truncate for all OSen, instead just use the (correctly - truncated) comm field.
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
|
||||
function __fish_complete_pgrep -d 'Complete pgrep/pkill' --argument-names cmd
|
||||
# Some implementations only track the first X characters of a process name
|
||||
# (with linux having the lowest X = 15).
|
||||
# Just cut at 15 for all, and put the rest in the description.
|
||||
complete -c $cmd -xa '(__fish_complete_proc | string replace -r "(.{15})(.+)" "\$1\\t\$2")'
|
||||
complete -c $cmd -xa '(__fish_complete_proc)'
|
||||
complete -c $cmd -s f -d 'Match pattern against full command line'
|
||||
complete -c $cmd -s g -d 'Only match processes in the process group' -xa '(__fish_complete_list , __fish_complete_groups)'
|
||||
complete -c $cmd -s G -d "Only match processes whose real group ID is listed. Group 0 is translated into $cmd\'s own process group" -xa '(__fish_complete_list , __fish_complete_groups)'
|
||||
|
||||
Reference in New Issue
Block a user