summaryrefslogtreecommitdiff
path: root/Biz/Ide/hoog.bash
diff options
context:
space:
mode:
Diffstat (limited to 'Biz/Ide/hoog.bash')
-rwxr-xr-xBiz/Ide/hoog.bash17
1 files changed, 17 insertions, 0 deletions
diff --git a/Biz/Ide/hoog.bash b/Biz/Ide/hoog.bash
new file mode 100755
index 0000000..976f0d4
--- /dev/null
+++ b/Biz/Ide/hoog.bash
@@ -0,0 +1,17 @@
+#!/usr/bin/env bash
+#
+# search hoogle with fzf
+#
+ set -euo pipefail
+ HOOG="hoogle search --count=200"
+ export FZF_DEFAULT_COMMAND="$HOOG $*"
+ result=$(fzf-tmux \
+ --preview-window=down \
+ --preview "hoogle search --link --info {+2}" \
+ --bind "change:reload:$HOOG {q} || true" \
+ --ansi \
+ | cut -d' ' -f 1,2 \
+ | sed -e 's/ /./g'
+ )
+ hoogle search --info "$result"
+##