diff options
author | Ben Sima <ben@bsima.me> | 2024-04-01 15:19:49 -0400 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2024-04-01 15:19:49 -0400 |
commit | 2d40ec3a03f4684f6fabba7dee2981c992a13785 (patch) | |
tree | 1edc1522fd5eb8e6d20b1b4dbde89f3e49ad9e51 /Biz/Ide/hoog.sh | |
parent | db373a8c727cad91d375b40a6c70b11ed73bdafb (diff) |
Rename .bash files to .sh
I was already using .sh to refer to shell scripts. When I added .bash, I didn't
realize that the linter was set to act on .sh files and not .bash files, so all
of these bash scripts escaped the linter.
This commit renames them to .sh, removes the .bash extension support from
Biz.Namespace, and fixes all the reported shellcheck errors.
Diffstat (limited to 'Biz/Ide/hoog.sh')
-rwxr-xr-x | Biz/Ide/hoog.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Biz/Ide/hoog.sh b/Biz/Ide/hoog.sh new file mode 100755 index 0000000..976f0d4 --- /dev/null +++ b/Biz/Ide/hoog.sh @@ -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" +## |