From: Siraaj Khandkar Date: Tue, 3 Dec 2019 21:11:42 +0000 (-0500) Subject: Add fuzzy dict search function X-Git-Url: https://git.xandkar.net/?a=commitdiff_plain;h=e0dbdb36bcead345015db47df3ce182abd835050;p=khome.git Add fuzzy dict search function --- diff --git a/home/.profile b/home/.profile index e94e141..9b45b68 100644 --- a/home/.profile +++ b/home/.profile @@ -1,5 +1,7 @@ . $HOME/lib/login_variables.private.sh # Personal data variables +unalias d # Defined by oh-my-zsh, but I want it for dict/fzf function. + for file in $HOME/lib/login_*.sh do . $file diff --git a/home/lib/login_functions.sh b/home/lib/login_functions.sh index 47942df..163c09e 100644 --- a/home/lib/login_functions.sh +++ b/home/lib/login_functions.sh @@ -1,3 +1,10 @@ +# + +d() { + local -r word=$(fzf < /usr/share/dict/words) + dict "$word" +} + # Top Disk-Using directories # TODO: Consider using numfmt instead of awk tdu() {