From 027dcce5d199d914c9c560f354fba71ef4974a00 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Mon, 20 May 2024 22:07:00 -0400 Subject: 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 --- Biz/Ide/ns.sh | 16 ++++++++-------- Biz/Ide/run.sh | 2 +- Biz/Log.py | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'Biz') 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 -- cgit v1.2.3