From c2f72222bb24f5d38d9036fb3034a471c1a6d7cc Mon Sep 17 00:00:00 2001 From: InigoGutierrez Date: Wed, 17 Jul 2019 16:59:26 +0200 Subject: Created script to use .paths file with fzf. --- selectPathFzf.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 selectPathFzf.sh (limited to 'selectPathFzf.sh') diff --git a/selectPathFzf.sh b/selectPathFzf.sh new file mode 100755 index 0000000..bfe77ad --- /dev/null +++ b/selectPathFzf.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +# Reads a paths file and uses fzf to echo a path. +# An argument is optional and is used as prompt. A default prompt is used if not provided. + +paths="$HOME/.paths" +[ -z "$1" ] && prompt="Choose a path: " || prompt="$1" +fzf --prompt "$prompt" <"$paths" | awk '{print $3}' + -- cgit v1.2.1