From e0dbdb36bcead345015db47df3ce182abd835050 Mon Sep 17 00:00:00 2001 From: Siraaj Khandkar Date: Tue, 3 Dec 2019 16:11:42 -0500 Subject: [PATCH] Add fuzzy dict search function --- home/.profile | 2 ++ home/lib/login_functions.sh | 7 +++++++ 2 files changed, 9 insertions(+) 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() { -- 2.20.1