aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorCody Hiar <codyfh@gmail.com>2019-04-26 16:40:28 -0600
committerCody Hiar <codyfh@gmail.com>2019-04-26 16:40:28 -0600
commit051c8477e205d66583b48aab85c89d769be617f7 (patch)
tree56be2738ceb93bdea0a5de1b13f7144305bb27b7 /scripts
parentbde2750faef0cff2404b724a2a4eaeeb8e225b88 (diff)
Adding fzf for files
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/path_search.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/path_search.sh b/scripts/path_search.sh
new file mode 100755
index 0000000..c6ee062
--- /dev/null
+++ b/scripts/path_search.sh
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+# vim: set filetype=sh
+#
+# Author: Cody Hiar
+# Date: 2019-04-26
+#
+# Description: Search buffer for unix filepaths
+
+URL=$(tmux capture-pane -pS -30000 | perl -wnl -e '/\S*(html|py|md|txt|pdf|js|ini|json)$/ and print $&' | awk '!x[$0]++' | fzf-tmux)
+if [[ -n "$URL" ]]; then
+ echo "$URL" | xp
+fi