summaryrefslogtreecommitdiff
path: root/Biz
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2024-05-20 22:07:00 -0400
committerBen Sima <ben@bsima.me>2024-05-20 23:15:31 -0400
commit027dcce5d199d914c9c560f354fba71ef4974a00 (patch)
tree89241c7219118a5fc064b2150382e57a60a91900 /Biz
parent20d55fa3131f8dc5468579acdd68c7f6572779c1 (diff)
Minor Ide changes & fixes
- ns.sh was broken because I never updated the commands to include the .sh extensions - changed a few other UI things in ns.sh to support my workflow - run.sh was broken when the exe name had a hyphen in it, so just use bild --plan instead of regex - changed the noqa to include the English name of the ignored rule because lets be real I'll never remember what A003 means
Diffstat (limited to 'Biz')
-rwxr-xr-xBiz/Ide/ns.sh16
-rwxr-xr-xBiz/Ide/run.sh2
-rw-r--r--Biz/Log.py2
3 files changed, 10 insertions, 10 deletions
diff --git a/Biz/Ide/ns.sh b/Biz/Ide/ns.sh
index 555380e..8c1a1a0 100755
--- a/Biz/Ide/ns.sh
+++ b/Biz/Ide/ns.sh
@@ -2,13 +2,13 @@
set -euo pipefail
fd --exclude=_ -t f . "${CODEROOT:?}" | sed "s,${CODEROOT:?}/*,,g" \
| fzf \
- --bind "alt-space:execute(bild {} && read -p [fin])" \
+ --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-c:execute(lint {} ; read -p [fin])" \
+ --bind "enter:execute(repl.sh {})" \
+ --bind "ctrl-space:execute(ship.sh {} ; read -p [fin])" \
+ --bind "alt-t:execute(bild {} ; run.sh {} test ; read -p [fin])" \
+ --bind "ctrl-/:change-preview-window(right,88|right,70%|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 {})" \
@@ -19,8 +19,8 @@ fd --exclude=_ -t f . "${CODEROOT:?}" | sed "s,${CODEROOT:?}/*,,g" \
--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="repl: enter | edit: alt-enter | bild: alt-space | test: alt-t | lint: alt-c | ship: ctrl-space" \
--header-first \
- --preview-window="border-sharp,88" \
+ --preview-window="border-sharp,bottom,70%" \
--preview "bat -p --color=always {}"
###
diff --git a/Biz/Ide/run.sh b/Biz/Ide/run.sh
index 8acb519..506aa92 100755
--- a/Biz/Ide/run.sh
+++ b/Biz/Ide/run.sh
@@ -2,5 +2,5 @@
set -eu
target=$1
shift
-out=$(rg --only-matching ": out (\w*)" -r '$1' "$target")
+out=$(bild --plan "$target" | jq --raw-output ".\"${target}\".out")
exec "${CODEROOT:?}/_/bin/$out" "$@"
diff --git a/Biz/Log.py b/Biz/Log.py
index 68b1e90..675a73e 100644
--- a/Biz/Log.py
+++ b/Biz/Log.py
@@ -1,6 +1,6 @@
"""Setup logging like Biz/Log.hs."""
-# ruff: noqa: A003
+# ruff: noqa: builtin-attribute-shadowing
import logging
import typing