summaryrefslogtreecommitdiff
path: root/Biz/Ide/hoog.sh
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2022-02-09 18:20:21 -0500
committerBen Sima <ben@bsima.me>2022-02-09 18:20:21 -0500
commit648dc18aa15fb8e25d8d0a0f06e2be8f1a222ac5 (patch)
tree5db6e403037dfd21b43c95a32c43bee501342296 /Biz/Ide/hoog.sh
parentf57b987ce66957a86baa846a813d5d3ddee6c6db (diff)
Use fzf-tmux and add hoog.sh to ghci
Diffstat (limited to 'Biz/Ide/hoog.sh')
-rwxr-xr-xBiz/Ide/hoog.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/Biz/Ide/hoog.sh b/Biz/Ide/hoog.sh
index 3945f90..976f0d4 100755
--- a/Biz/Ide/hoog.sh
+++ b/Biz/Ide/hoog.sh
@@ -5,10 +5,13 @@
set -euo pipefail
HOOG="hoogle search --count=200"
export FZF_DEFAULT_COMMAND="$HOOG $*"
- fzf \
+ result=$(fzf-tmux \
--preview-window=down \
--preview "hoogle search --link --info {+2}" \
--bind "change:reload:$HOOG {q} || true" \
- --print-query \
- --ansi
+ --ansi \
+ | cut -d' ' -f 1,2 \
+ | sed -e 's/ /./g'
+ )
+ hoogle search --info "$result"
##