From 051c8477e205d66583b48aab85c89d769be617f7 Mon Sep 17 00:00:00 2001 From: Cody Hiar Date: Fri, 26 Apr 2019 16:40:28 -0600 Subject: Adding fzf for files --- scripts/path_search.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 scripts/path_search.sh (limited to 'scripts') 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 -- cgit v1.2.3