2020-04-19 03:05:16 +00:00
|
|
|
function __fish_complete_proc --inherit-variable ps
|
2018-11-22 14:23:05 +00:00
|
|
|
# "comm=" means "print comm field with an empty name", which causes the header to be removed.
|
|
|
|
# On many systems, comm is truncated (e.g. on Linux it's 15 chars),
|
|
|
|
# but that's okay since commands that accept them as argument also only use those (e.g. pgrep).
|
|
|
|
# String removes zombies (ones in parentheses) and padding (macOS adds some apparently).
|
2020-04-19 03:05:16 +00:00
|
|
|
__fish_ps -o comm= | string match -rv '\(.*\)' | string trim
|
2011-09-23 08:24:21 +00:00
|
|
|
end
|