|
|
@@ -10,32 +10,40 @@ alias cdkw='cdk watch'
|
|
|
|
|
|
function ch(){
|
|
|
local opts=$(cat << EOF
|
|
|
-cdk :: . ______________
|
|
|
-cdk_boot_def :: cdk bootstrap
|
|
|
-cdk_boot_imprt :: cdk bootstrap aws://%s/%s
|
|
|
-cdk_boot_nodef :x: $(printf "cdk bootstrap --qualifier '%s'" "${1}" )
|
|
|
-cdk_diff :: NO_COLOR=1 cdk diff 2>&1 | tee cdk_diff.txt
|
|
|
-cdk_diff_sglstg :: NO_COLOR=1 cdk diff '%s' 2>&1 | tee cdk_diff.txt
|
|
|
-cdk_diff_sglstk :: NO_COLOR=1 cdk diff '%s' 2>&1 | tee cdk_diff.txt
|
|
|
-cdk_init :: cdk init app --language typescript
|
|
|
-cdk_synth :: NO_COLOR=1 cdk synth 2>&1 | tee cdk_synth.txt
|
|
|
-cdk_synth_sgl :: NO_COLOR=1 cdk synth '%s' 2>&1 | tee cdk_synth.txt
|
|
|
-code :: . ______________
|
|
|
-code_cdktxt :: code '%s'
|
|
|
-crs :: . ______________
|
|
|
-crs_link :: $(printf "rm -f ~/dev/cursor/* ; ln -s '%s' '%s/dev/cursor/cdk_stuff_%s'" "${PWD}" "${HOME}" "$(pwd | sed -E 's|(.*)/head/(.*)|\1|g' | rev | cut -d '/' -f 1 | rev)")
|
|
|
-npm :: . ______________
|
|
|
-npm_inst :: npm install
|
|
|
-npm_inst :: npx tsc
|
|
|
+cdk :: . ______________
|
|
|
+cdk_boot_def :: cdk bootstrap
|
|
|
+cdk_boot_imprt :: cdk bootstrap aws://%s/%s
|
|
|
+cdk_boot_nodef :x: $(printf "cdk bootstrap --qualifier '%s'" "${1}" )
|
|
|
+cdk_diff :: NO_COLOR=1 cdk diff 2>&1 | tee cdk_diff.txt
|
|
|
+cdk_diff_sglstg :: NO_COLOR=1 cdk diff '%s' 2>&1 | tee cdk_diff.txt
|
|
|
+cdk_diff_sglstk :: NO_COLOR=1 cdk diff '%s' 2>&1 | tee cdk_diff.txt
|
|
|
+cdk_init :: cdk init app --language typescript
|
|
|
+cdk_synth :: NO_COLOR=1 cdk synth 2>&1 | tee cdk_synth.txt
|
|
|
+cdk_synth_sgl :: NO_COLOR=1 cdk synth '%s' 2>&1 | tee cdk_synth.txt
|
|
|
+chk :: . ______________
|
|
|
+chk_mstr :: find . -type f -regex '.*\.ts$' -path '*/head*' -not -path '*/node_modules*' -not -path '*/.git*' | sort -u | xargs -rI{} grep -EHn "^" '{}' >masterAllCnt.txt
|
|
|
+chk_run_hddn :: cat '%s' | grep -E 'Naming convention violation|Expected format:'
|
|
|
+code :: . ______________
|
|
|
+code_cdktxt :: code '%s'
|
|
|
+crs :: . ______________
|
|
|
+crs_link :: $(printf "rm -f ~/dev/cursor/* ; ln -s '%s' '%s/dev/cursor/cdk_stuff_%s'" "${PWD}" "${HOME}" "$(pwd | sed -E 's|(.*)/head/(.*)|\1|g' | rev | cut -d '/' -f 1 | rev)")
|
|
|
+npm :: . ______________
|
|
|
+npm_inst :: npm install
|
|
|
+npm_inst :: npx tsc
|
|
|
+git :: . ______________
|
|
|
+git_chkout_brnch :: find -type d | grep -E 'head$|master$' | xargs -rI{} bash -c "cd '{}' ; git checkout '%s'"
|
|
|
EOF
|
|
|
)
|
|
|
|
|
|
-local stages=$(cat << EOF
|
|
|
+local cdk_stages=$(cat << EOF
|
|
|
*-DEV-CLD
|
|
|
EOF
|
|
|
)
|
|
|
|
|
|
-
|
|
|
+local git_branches=$(cat << EOF
|
|
|
+dev
|
|
|
+EOF
|
|
|
+)
|
|
|
|
|
|
local selOpt=$(echo "${opts}" | grep -vE '^##' | nl -i1 -n'rz' -v0 -w3 | sort -ru | fzf)
|
|
|
|
|
|
@@ -58,15 +66,18 @@ EOF
|
|
|
cdk_boot_imprt)
|
|
|
selOpt=$(printf "${selOpt}" "$(aws sts get-caller-identity --query "Account" --output text)" "$(aws configure get region)")
|
|
|
;;
|
|
|
- cdk_synth_sgl|cdk_diff_sglstg)
|
|
|
- selOpt=$(printf "${selOpt}" "$(echo "${stages}" | grep -vE '^##' | sort -ru | fzf)")
|
|
|
- ;;
|
|
|
cdk_diff_sglstk)
|
|
|
selOpt=$(printf "${selOpt}" "$(printf "$(cdk ls)" | grep -vE '^Now using' | fzf)")
|
|
|
;;
|
|
|
- code_cdktxt)
|
|
|
+ cdk_diff_sglstg|cdk_synth_sgl)
|
|
|
+ selOpt=$(printf "${selOpt}" "$(echo "${cdk_stages}" | grep -vE '^##' | sort -ru | fzf)")
|
|
|
+ ;;
|
|
|
+ chk_run_hddn|code_cdktxt)
|
|
|
selOpt=$(printf "${selOpt}" "$(ls -1 | grep -E 'cdk.*\.txt$' | fzf)")
|
|
|
;;
|
|
|
+ git_chkout_brnch)
|
|
|
+ selOpt=$(printf "${selOpt}" "$(echo "${git_branches}" | grep -vE '^##' | sort -ru | fzf)")
|
|
|
+ ;;
|
|
|
*)
|
|
|
;;
|
|
|
esac
|