From 6e144bcba48c7fd7a707693874a9bb311afd2c33 Mon Sep 17 00:00:00 2001 From: Till Höppner Date: Mon, 15 May 2017 14:34:02 +0200 Subject: Add fuzzy cd/locate/kill --- functions/fkill | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 functions/fkill (limited to 'functions/fkill') diff --git a/functions/fkill b/functions/fkill new file mode 100644 index 0000000..799fdbe --- /dev/null +++ b/functions/fkill @@ -0,0 +1,7 @@ +local pid +pid=$(ps -ef | sed 1d | fzf -m | awk '{print $2}') + +if [ "x$pid" != "x" ] +then + echo $pid | xargs kill -${1:-9} +fi -- cgit v1.2.3