summaryrefslogtreecommitdiff
path: root/Biz/Ide/ns
diff options
context:
space:
mode:
Diffstat (limited to 'Biz/Ide/ns')
-rwxr-xr-xBiz/Ide/ns58
1 files changed, 24 insertions, 34 deletions
diff --git a/Biz/Ide/ns b/Biz/Ide/ns
index c1db77b..cc299c7 100755
--- a/Biz/Ide/ns
+++ b/Biz/Ide/ns
@@ -1,34 +1,24 @@
-#!/usr/bin/env bash
-##
- if [[ $NOUN == "" ]]
- then
- export NOUN=$(fd --exclude=_ -t f . $BIZ_ROOT | fzf-tmux)
- fi
-##
- if [[ $VERB == "" ]]
- then
- export VERB=$(fzf-tmux <<< $(sed 's/ /\n/g' <<< "edit bild push ship lint"))
- fi
-##
- $VERB $NOUN
-##
- printf "\nn:\tchange ns\nv:\tchange verb\nb:\tchange both\n^C:\texit\nelse:\tcontinue\n"
- read -p " ns> " -n 1 input
-##
- if [[ $input == "v" ]]
- then
- unset VERB
- $0
- elif [[ $input == "n" ]]
- then
- unset NOUN
- $0
- elif [[ $input == "b" ]]
- then
- unset NOUN
- unset VERB
- $0
- else
- $0
- fi
-##
+cat \
+ <(echo "ship: ctrl-space") \
+ <(echo "lint: alt-l") \
+ <(echo "test: alt-t") \
+ <(echo "bild: alt-space") \
+ <(echo "edit: alt-enter") \
+ <(echo "repl: enter") \
+ <(fd --exclude=_ -t f . $BIZ_ROOT | sed "s,$BIZ_ROOT/*,,g") \
+ | fzf-tmux \
+ --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(88|hidden|)" \
+ --bind "alt-0:change-preview(cat {})" \
+ --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 "pgup:preview-page-up" \
+ --bind "pgdn:preview-page-down" \
+ --header-lines=6 \
+ --header-first \
+ --preview-window="border-sharp,88" \
+ --preview "cat {}"