Permalink
Cannot retrieve contributors at this time
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
14 lines (11 sloc)
463 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### PROCESS | |
# mnemonic: [K]ill [P]rocess | |
# show output of "ps -ef", use [tab] to select one or multiple entries | |
# press [enter] to kill selected processes and go back to the process list. | |
# or press [escape] to go back to the process list. Press [escape] twice to exit completely. | |
local pid=$(ps -ef | sed 1d | eval "fzf ${FZF_DEFAULT_OPTS} -m --header='[kill:process]'" | awk '{print $2}') | |
if [ "x$pid" != "x" ] | |
then | |
echo $pid | xargs kill -${1:-9} | |
kp | |
fi | |