summaryrefslogtreecommitdiff
path: root/solanum/fzf2.sh
diff options
context:
space:
mode:
authorAlex Auvolat <alex.auvolat@inria.fr>2020-02-18 11:35:37 +0100
committerAlex Auvolat <alex.auvolat@inria.fr>2020-02-18 11:35:37 +0100
commit9ac0d58102a395f983c59d1504e0910ebfa0b17f (patch)
tree95e7b03eeb4c86327af3b9f9ca4c9bd58165f549 /solanum/fzf2.sh
parentf3e78201ed4e30043ee529045f9e1ce23537ec90 (diff)
downloaduser-config-9ac0d58102a395f983c59d1504e0910ebfa0b17f.tar.gz
user-config-9ac0d58102a395f983c59d1504e0910ebfa0b17f.zip
FZF config
Diffstat (limited to 'solanum/fzf2.sh')
-rwxr-xr-xsolanum/fzf2.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/solanum/fzf2.sh b/solanum/fzf2.sh
new file mode 100755
index 0000000..bf774a5
--- /dev/null
+++ b/solanum/fzf2.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+cmd=$(compgen -c | fzf)
+
+if [ -z "$cmd" ]; then
+ exit
+fi
+
+file=$(fzf)
+
+if [ -z "$file" ]; then
+ exit
+fi
+
+"$cmd" "$file" &
+
+sleep 1