From 6513755670892983db88a6633b8c1ea6019c03d1 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Fri, 15 Nov 2024 14:55:37 -0500 Subject: Re-namespace some stuff to Omni I was getting confused about what is a product and what is internal infrastructure; I think it is good to keep those things separate. So I moved a bunch of stuff to an Omni namespace, actually most stuff went there. Only things that are explicitly external products are still in the Biz namespace. --- Omni/Ide/ns.sh | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100755 Omni/Ide/ns.sh (limited to 'Omni/Ide/ns.sh') diff --git a/Omni/Ide/ns.sh b/Omni/Ide/ns.sh new file mode 100755 index 0000000..a56ed89 --- /dev/null +++ b/Omni/Ide/ns.sh @@ -0,0 +1,50 @@ +#!/usr/bin/env bash +set -euo pipefail +nss="fd --color=always --exclude=_ -t f . \"${CODEROOT:?}\" | sed \"s,${CODEROOT:?}/*,,g\"" +keybindings=$(cat < ' -s':' -t <<< \"$keybindings\")" + --bind "alt-n:execute(touch {q})+reload($nss)" + --bind "alt-space:execute(bild {} ; read -p [fin])" + --bind "tab:execute($EDITOR {})" + --bind "alt-c:execute(lint -f {} ; read -p [fin])" + --bind "enter:execute(repl.sh {})" + --bind "alt-enter:execute(repl.sh --bash {})" + --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 {})" + --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-first + --header="? for keybindings" + --border=top + --border-label="$(lolcat -f <<< "hack a namespace")" + --color=label:italic + --preview-window="bottom,80%" + --preview "bat -p --color=always {}" +) +sh -c "$nss" | fzf "${fzf_flags[@]}" + -- cgit v1.2.3