17 lines
344 B
Fish
17 lines
344 B
Fish
# vim: ft=fish ts=4 sw=4 noet
|
|
function fkill
|
|
command ps -u $USER -o "pid,ppid,etime,stat,tname,cmd" --no-headers | command fzf -m | while read -l pid _
|
|
set pids $pids $pid
|
|
end
|
|
|
|
if [ -z $pids ]
|
|
return 1
|
|
end
|
|
|
|
if string match --quiet --regex --invert '\D' $argv[1];
|
|
kill $argv[1] -- $pids
|
|
else
|
|
kill -- $pids
|
|
end
|
|
return $status
|
|
end
|