Support busybox ps in process completions

Fixes #6918
This commit is contained in:
Johannes Altmanninger
2020-04-19 05:05:16 +02:00
parent 6ab2d78936
commit 9c6e81a838
3 changed files with 11 additions and 3 deletions

View File

@@ -5,6 +5,6 @@ function __fish_complete_pids -d "Print a list of process identifiers along with
# Display the tty if available
# But not if it's just question marks, meaning no tty
ps axc -o pid,ucomm,tty | string match -r -v '^\s*'$fish_pid'\s' | tail -n +2 | string replace -r ' *([0-9]+) +([^ ].*[^ ]|[^ ]) +([^ ]+) *$' '$1\t$2 [$3]' | string replace -r ' *\[\?*\] *$' ''
__fish_ps -o pid,comm,tty | string match -r -v '^\s*'$fish_pid'\s' | tail -n +2 | string replace -r ' *([0-9]+) +([^ ].*[^ ]|[^ ]) +([^ ]+) *$' '$1\t$2 [$3]' | string replace -r ' *\[\?*\] *$' ''
end