shell/fzf: add bin/fzf-kill
This commit is contained in:
parent
5a65cc9960
commit
bf926c8e84
9
shell/fzf/bin/fzf-kill
Executable file
9
shell/fzf/bin/fzf-kill
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Interactively select a process to kill.
|
||||
|
||||
pid=$(ps -ef | sed 1d | gui-fzf -m | awk '{print $2}')
|
||||
|
||||
if [[ $pid ]]; then
|
||||
xargs kill -${1:-9} <<< "$pid"
|
||||
fi
|
Loading…
Reference in a new issue