diff --git a/shell/fzf/bin/fzf-kill b/shell/fzf/bin/fzf-kill new file mode 100755 index 00000000..0aa0310d --- /dev/null +++ b/shell/fzf/bin/fzf-kill @@ -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