helm/shell/fzf/bin/fzf-kill
2017-12-06 01:39:10 -05:00

10 lines
172 B
Bash
Executable file

#!/usr/bin/env bash
# Interactively select a process to kill.
pid=$(ps -ef | sed 1d | fzf -m | awk '{print $2}')
if [[ $pid ]]; then
xargs kill -${1:-9} <<< "$pid"
fi