Add fuzzy dict search function
authorSiraaj Khandkar <siraaj@khandkar.net>
Tue, 3 Dec 2019 21:11:42 +0000 (16:11 -0500)
committerSiraaj Khandkar <siraaj@khandkar.net>
Tue, 3 Dec 2019 21:11:42 +0000 (16:11 -0500)
home/.profile
home/lib/login_functions.sh

index e94e141..9b45b68 100644 (file)
@@ -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
index 47942df..163c09e 100644 (file)
@@ -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() {
This page took 0.024605 seconds and 4 git commands to generate.