From 359de7e1bd1351adb9ab537cc424839ca6f2876b Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 17 Jun 2019 18:01:23 +0200 Subject: [PATCH] Rename fuzzy finding shell script In preparation for extending the scripting, renamed the script from just being a re-aliasing of fzf. Now, all fuzzy finding logic can reside in this file. --- .../{alias-fuzzy-finder-to-fzf.sh => fuzzy-finding.sh} | 7 +++++++ 1 file changed, 7 insertions(+) rename .config/shell/rc.d/{alias-fuzzy-finder-to-fzf.sh => fuzzy-finding.sh} (65%) diff --git a/.config/shell/rc.d/alias-fuzzy-finder-to-fzf.sh b/.config/shell/rc.d/fuzzy-finding.sh similarity index 65% rename from .config/shell/rc.d/alias-fuzzy-finder-to-fzf.sh rename to .config/shell/rc.d/fuzzy-finding.sh index 775d4fc..b60f260 100644 --- a/.config/shell/rc.d/alias-fuzzy-finder-to-fzf.sh +++ b/.config/shell/rc.d/fuzzy-finding.sh @@ -23,3 +23,10 @@ elif type ack >/dev/null 2>&1; then else echo "[WARNING]: No grep-like found - install rg/ag/ack to enable functionality" fi + +# set up fuzzy file and directory search +alias f="fzf -c 'find . -type f' --preview='head -$LINES {}' | xargs rifle" +alias F="fzf -c 'find ~ -type f' --preview='head -$LINES {}' | xargs rifle" + +alias d="fzf -c 'find . -type d' --preview='ls --color='always' {}' | xargs rifle" +alias D="fzf -c 'find ~ -type d' --preview='ls --color='always' {}' --color=dark --ansi | xargs rifle"