summaryrefslogtreecommitdiff
path: root/Biz/Ide/ns
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2021-06-14 10:39:17 -0400
committerBen Sima <ben@bsima.me>2021-11-26 13:47:36 -0500
commit9dcfb66c99909d1b51a76bdaf75ddbdb030fe270 (patch)
treed6c278aaec0416acb606d3ac2110f08c07c20b7c /Biz/Ide/ns
parentce1edea5da3318aea15dea0236aac421642a483e (diff)
Move commands and add ns function
Diffstat (limited to 'Biz/Ide/ns')
-rwxr-xr-xBiz/Ide/ns27
1 files changed, 27 insertions, 0 deletions
diff --git a/Biz/Ide/ns b/Biz/Ide/ns
new file mode 100755
index 0000000..2791903
--- /dev/null
+++ b/Biz/Ide/ns
@@ -0,0 +1,27 @@
+#!/usr/bin/env bash
+
+if [[ $NS == "" ]]
+then
+ export NS=$(fd --exclude=_ -t f . $BIZ_ROOT | fzf)
+fi
+
+if [[ $VERB == "" ]]
+then
+ export VERB=$(fzf <<< $(sed 's/ /\n/g' <<< "edit bild push ship lint"))
+fi
+
+$VERB $NS
+
+read -p "n to change ns, v to change verb, enter to continue, or ^C to exit" -n 1 input
+
+if [[ $input == "v" ]]
+then
+ unset VERB
+ $0
+elif [[ $input == "n" ]]
+then
+ unset NS
+ $0
+else
+ $0
+fi