Case-insensitive wiki-searching

This commit is contained in:
Sage Vaillancourt 2022-02-01 00:23:02 -05:00
parent 2e60415325
commit bb30274e25
1 changed files with 2 additions and 2 deletions

View File

@ -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"