diff options
author | Ben Sima <ben@bsima.me> | 2023-10-10 13:15:59 -0400 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2023-10-10 13:15:59 -0400 |
commit | 904de577261e7024373e7a42fd763184764238f9 (patch) | |
tree | 563e4968eab568466ae3e7a1c747dd24a77986c0 /Biz/Ide/ns | |
parent | 6107f8178e26ada67e5d5ec60501e24528b3db56 (diff) |
Don't swallow namespace-parsing errors
Previously, if there was a problem with the inputs and bild failed to
determine the namespace, 'fromPath' would return 'Nothing' and then
'catMaybes' would drop the error-causing input altogether. In the one
time that I had a bad input, this made debugging incredibly difficult.
It's always a bad idea to swallow errors silently, so instead lets just
kill the program if we have bad inputs.
Diffstat (limited to 'Biz/Ide/ns')
-rwxr-xr-x | Biz/Ide/ns | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/Biz/Ide/ns b/Biz/Ide/ns deleted file mode 100755 index e988bfe..0000000 --- a/Biz/Ide/ns +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail -fd --exclude=_ -t f . ${CODEROOT:?} | sed "s,${CODEROOT:?}/*,,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 {}" -### |