summaryrefslogtreecommitdiff
path: root/Biz/Ide/ns
blob: c32b5d214c5d14e3fc27ca83aaaf2823712f165f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/env bash
set -euo pipefail
fd --exclude=_ -t f . ${BIZ_ROOT:?} | sed "s,${BIZ_ROOT:?}/*,,g" \
  | fzf \
    --bind "alt-space:execute(bild {} && read -p [fin])" \
    --bind "alt-enter:execute(vim  {})" \
    --bind "alt-l:execute(lint {} && read -p [fin])" \
    --bind "enter:execute(repl {})" \
    --bind "ctrl-space:execute(ship {} && read -p [fin])" \
    --bind "alt-t:execute(bild {} && run {} test && read -p [fin])" \
    --bind "ctrl-/:change-preview-window(90%|hidden|)" \
    --bind "alt-0:change-preview(bat -p --color=always {})" \
    --bind "alt-1:change-preview(git log --color=always --date=relative --abbrev-commit --pretty=format:'%Cred%h%Creset %s / %an %Creset%C(yellow)%d%Creset%Cgreen(%cr)%Creset' -- {})" \
    --bind "alt-2:change-preview(git log --color=always {})" \
    --bind "alt-3:change-preview(git log --color=always -p {})" \
    --bind "alt-4:change-preview(git blame -c --date=short {})" \
    --bind "alt-5:change-preview(git log --pretty=short {} | git shortlog -nse)" \
    --bind "alt-6:change-preview(git log --pretty=short {} | git shortlog)" \
    --bind "backward-eof:abort" \
    --bind "pgup:preview-page-up" \
    --bind "pgdn:preview-page-down" \
    --header="repl: enter | edit: alt-enter | bild: alt-space | test: alt-t | lint: alt-l | ship: ctrl-space" \
    --header-first \
    --preview-window="border-sharp,88" \
    --preview "bat -p --color=always {}"
###