summaryrefslogtreecommitdiff
path: root/Biz/Ide/ns
blob: 279190390431d94c080f627530e332c58044f410 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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