summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--functions/fd3
-rw-r--r--functions/fkill7
-rw-r--r--functions/fl3
3 files changed, 13 insertions, 0 deletions
diff --git a/functions/fd b/functions/fd
new file mode 100644
index 0000000..16f54d6
--- /dev/null
+++ b/functions/fd
@@ -0,0 +1,3 @@
+# fda - including hidden directories
+local dir
+dir=$(find ${1:-.} -type d 2> /dev/null | fzf +m) && cd "$dir"
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
diff --git a/functions/fl b/functions/fl
new file mode 100644
index 0000000..d73a525
--- /dev/null
+++ b/functions/fl
@@ -0,0 +1,3 @@
+# fda - including hidden directories
+local dir
+dir=$(locate / | fzf +m) && cd "$dir"