From bb30274e25af37f9a875a73e55a1a782a99ecd93 Mon Sep 17 00:00:00 2001 From: Sage Vaillancourt Date: Tue, 1 Feb 2022 00:23:02 -0500 Subject: [PATCH] Case-insensitive wiki-searching --- .shell_aliases | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.shell_aliases b/.shell_aliases index 5505c44..827f655 100755 --- a/.shell_aliases +++ b/.shell_aliases @@ -8,7 +8,7 @@ function wf { if [[ "$@" != "" ]]; then local fzf_args="-q $@" fi - echo ~/wiki/"$(rg --with-filename --no-heading . ~/wiki | sed 's@/home/sage/wiki/@@' | fzf $fzf_args -1 --preview='bat ~/wiki/$(echo {} | sed "s/:.*//")' | sed 's/:.*//')" + echo ~/wiki/"$(rg --with-filename --no-heading . ~/wiki | sed 's@/home/sage/wiki/@@' | fzf -i $fzf_args -1 --preview='bat ~/wiki/$(echo {} | sed "s/:.*//")' | sed 's/:.*//')" } function ws { @@ -19,7 +19,7 @@ function ws { } function ww { - ws $(rg --no-line-number --no-filename . ~/wiki | sed 's/[^a-zA-Z0-9]\+/\n/g' | grep -v "^$" | sort -f | uniq -ci | sort -hr | fzf | cut -c 9-) + ws $(rg --no-line-number --no-filename . ~/wiki | sed 's/[^a-zA-Z0-9]\+/\n/g' | grep -v "^$" | sort -f | uniq -ci | sort -hr | fzf -i | cut -c 9-) } alias cat="bat"