diff --git a/.vscode/settings.json b/.vscode/settings.json index 5a7adf6..63290c1 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -49,6 +49,7 @@ "printf", "proto", "quickstart", + "readarray", "renice", "retval", "rwin", @@ -64,6 +65,7 @@ "tnum", "tprintf", "tput", + "treadarray", "ttput", "uarr", "uname", diff --git a/CHANGELOG.md b/CHANGELOG.md index 2744180..abe03b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,10 @@ # Change Log -## 5.?.? +## 5.5.1 - `build.go` now generates `COMMANDS.md` as well. -- Fixed #34 (Argument parsing for switches may result in infinite loop) +- Fixed #34 (Argument parsing for switches may result in infinite loop). +- Numerous bug fixed in `fn`s. ## 5.5.0 diff --git a/README.md b/README.md index 474a9a5..070fe5d 100644 --- a/README.md +++ b/README.md @@ -40,11 +40,8 @@ Sometimes doing a job takes more than a `snippet`. `Shellman` has ready to use f ### Latest release Notes -## 5.5.0 - -- `process Name by ID`: Get process name by it's ID(s). -- Fixed #28 (COMMANDS.md links not working). -- Added animation examples for pendular mode. -- Fixed #29 (thanks to @rwin-novo). -- Fixed #30 and #32 (thanks to @jsbrain). -- Code section removed from `COMMANDS.md`. +## 5.5.1 + +- `build.go` now generates `COMMANDS.md` as well. +- Fixed #34 (Argument parsing for switches may result in infinite loop). +- Numerous bug fixed in `fn`s. diff --git a/nsroot/fn-fx/fn-animate.json b/nsroot/fn-fx/fn-animate.json index 604b531..d5379de 100644 --- a/nsroot/fn-fx/fn-animate.json +++ b/nsroot/fn-fx/fn-animate.json @@ -7,11 +7,11 @@ "", "\t((lastIndex=\\${#frames[@]} - 1))", "\tlocal mode=\\${frames[lastIndex]}", - "\tunset frames[lastIndex]", + "\tunset \"frames[lastIndex]\"", "", "\t((lastIndex=\\${#frames[@]} - 1))", "\tlocal interval=\\${frames[lastIndex]}", - "\tunset frames[lastIndex]", + "\tunset \"frames[lastIndex]\"", "", "\t# Comment out next two lines if you are using CTRL+C event handler.", "${1:\ttrap 'tput cnorm; echo' EXIT\n\ttrap 'exit 127' HUP INT TERM}\n", @@ -25,8 +25,8 @@ "\tmax=\"\\${#frames[@]}\"", "\tindices=()", "\tdirection=\"forward\"", - "\tforwardIndices=( \\$(seq 0 1 \"\\${max}\") )", - "\tbackwardIndices=( \\$(seq \"\\${max}\" -1 0) )", + "\treadarray -t forwardIndices < <(seq 0 1 \"\\${max}\")", + "\treadarray -t backwardIndices < <(seq \"\\${max}\" -1 0)", "", "\twhile true; do", "\t\tif [ \"\\${mode}\" = \"circular\" ]; then", diff --git a/nsroot/fn-fx/fn-banner-color.json b/nsroot/fn-fx/fn-banner-color.json index a91cd02..542c379 100644 --- a/nsroot/fn-fx/fn-banner-color.json +++ b/nsroot/fn-fx/fn-banner-color.json @@ -24,7 +24,8 @@ "\t\t;;", "\tesac\n", "\tlocal msg=\"\\${3\\} \\${1\\} \\${3\\}\"", - "\tlocal edge=\\$(echo \"\\${msg}\" | sed \"s/./\\${3}/g\")", + "\tlocal edge", + "\tedge=\\${msg\/\/?\/\\$3\\}", "\ttput setaf \\${color\\}", "\ttput bold", "\techo \"\\${edge}\"", diff --git a/nsroot/fn-fx/fn-banner-simple.json b/nsroot/fn-fx/fn-banner-simple.json index d3fdddb..0cf9782 100644 --- a/nsroot/fn-fx/fn-banner-simple.json +++ b/nsroot/fn-fx/fn-banner-simple.json @@ -4,7 +4,8 @@ "# Usage: bannerSimple \"my title\" \"*\"", "function bannerSimple() {", "\tlocal msg=\"\\${2\\} \\${1\\} \\${2\\}\"", - "\tlocal edge=\\$(echo \"\\${msg\\}\" | sed \"s/./\"\\${2}\"/g\")", + "\tlocal edge", + "\tedge=\\${msg\/\/?\/\\$2\\}", "\techo \"\\${edge\\}\"", "\techo \"\\$(tput bold)\\${msg\\}\\$(tput sgr0)\"", "\techo \"\\${edge\\}\"", diff --git a/nsroot/fn-fx/fn-input-choice.json b/nsroot/fn-fx/fn-input-choice.json index 4855184..cdc7be4 100644 --- a/nsroot/fn-fx/fn-input-choice.json +++ b/nsroot/fn-fx/fn-input-choice.json @@ -7,27 +7,28 @@ "# Usage: options=(\"one\" \"two\" \"three\"); inputChoice \"Choose:\" 1 \"\\${options[@]}\"; choice=\\$?; echo \"\\${options[\\$choice]}\"", "function inputChoice() {", "\techo \"\\${1\\}\"; shift", - "\techo \\$(tput dim)-\"Change option: [up/down], Select: [ENTER]\" \\$(tput sgr0)", + "\techo \"\\$(tput dim)\"\"- Change option: [up/down], Select: [ENTER]\" \"\\$(tput sgr0)\"", "\tlocal selected=\"\\${1\\}\"; shift\n", "\tESC=\\$(echo -e \"\\033\")", "\tcursor_blink_on() { tput cnorm; }", "\tcursor_blink_off() { tput civis; }", "\tcursor_to() { tput cup \\$((\\$1-1)); }", - "\tprint_option() { echo \\$(tput sgr0) \"\\$1\" \\$(tput sgr0); }", - "\tprint_selected() { echo \\$(tput rev) \"\\$1\" \\$(tput sgr0); }", - "\tget_cursor_row() { IFS=';' read -sdR -p \\$'\\E[6n' ROW COL; echo \\${ROW#*[}; }", - "\tkey_input() { read -s -n3 key 2>/dev/null >&2; [[ \\$key = \\$ESC[A ]] && echo up; [[ \\$key = \\$ESC[B ]] && echo down; [[ \\$key = \"\" ]] && echo enter; }\n", + "\tprint_option() { echo \"\\$(tput sgr0)\" \"\\$1\" \"\\$(tput sgr0)\"; }", + "\tprint_selected() { echo \"\\$(tput rev)\" \"\\$1\" \"\\$(tput sgr0)\"; }", + "\tget_cursor_row() { IFS=';' read -rsdR -p \\$'\\E[6n' ROW COL; echo \"\\${ROW#*[}\"; }", + "\tkey_input() { read -rs -n3 key 2>/dev/null >&2; [[ \\$key = \\${ESC}[A ]] && echo up; [[ \\$key = \\${ESC}[B ]] && echo down; [[ \\$key = \"\" ]] && echo enter; }\n", "\tfor opt; do echo; done\n", - "\tlocal lastrow=\\$(get_cursor_row)", - "\tlocal startrow=\\$((\\$lastrow - \\$#))", + "\tlocal lastrow", + "\tlastrow=\\$(get_cursor_row)", + "\tlocal startrow=\\$((lastrow - \\$#))", "\ttrap \"cursor_blink_on; echo; echo; exit\" 2", "\tcursor_blink_off\n", "\t: selected:=0\n", "\twhile true; do", "\t\tlocal idx=0", "\t\tfor opt; do", - "\t\t\tcursor_to \\$((\\$startrow + \\$idx))", - "\t\t\tif [ \\${idx\\} -eq \\${selected\\} ]; then", + "\t\t\tcursor_to \\$((startrow + idx))", + "\t\t\tif [ \\${idx\\} -eq \"\\${selected\\}\" ]; then", "\t\t\t\tprint_selected \"\\${opt\\}\"", "\t\t\telse", "\t\t\t\tprint_option \"\\${opt\\}\"", diff --git a/nsroot/fn-fx/fn-input-multi-choice.json b/nsroot/fn-fx/fn-input-multi-choice.json index dd1f781..393cd62 100644 --- a/nsroot/fn-fx/fn-input-multi-choice.json +++ b/nsroot/fn-fx/fn-input-multi-choice.json @@ -6,18 +6,17 @@ "body": [ "# Usage: multiChoice \"header message\" resultArray \"comma separated options\" \"comma separated default values\"", "# Credit: https://serverfault.com/a/949806", - "# TODO: 1) Refactoring to return result array 2) Get input options as array", "function multiChoice {", "\techo \"\\${1\\}\"; shift", - "\techo \\$(tput dim)-\"Change Option: [up/down], Change Selection: [space], Done: [ENTER]\" \\$(tput sgr0)", + "\techo \"\\$(tput dim)\"\"- Change Option: [up/down], Change Selection: [space], Done: [ENTER]\" \"\\$(tput sgr0)\"", "\t# little helpers for terminal print control and key input", "\tESC=\\$( printf \"\\033\")", - "\tcursor_blink_on() { printf \"\\$ESC[?25h\"; }", - "\tcursor_blink_off() { printf \"\\$ESC[?25l\"; }", - "\tcursor_to() { printf \"\\$ESC[\\$1;\\${2:-1}H\"; }", - "\tprint_inactive() { printf \"\\$2 \\$1 \"; }", - "\tprint_active() { printf \"\\$2 \\$ESC[7m \\$1 \\$ESC[27m\"; }", - "\tget_cursor_row() { IFS=';' read -sdR -p \\$'\\E[6n' ROW COL; echo \\${ROW#*[}; }", + "\tcursor_blink_on() { printf \"%s\" \"\\${ESC}[?25h\"; }", + "\tcursor_blink_off() { printf \"%s\" \"\\${ESC}[?25l\"; }", + "\tcursor_to() { printf \"%s\" \"\\${ESC}[\\$1;\\${2:-1}H\"; }", + "\tprint_inactive() { printf \"%s %s \" \"\\$2\" \"\\$1\"; }", + "\tprint_active() { printf \"%s \\${ESC}[7m \\$1 \\${ESC}[27m\" \"\\$2\"; }", + "\tget_cursor_row() { IFS=';' read -rsdR -p \\$'\\E[6n' ROW COL; echo \"\\${ROW#*[}\"; }", "\tkey_input() {", "\t\tlocal key", "\t\tIFS= read -rsn1 key 2>/dev/null >&2", @@ -38,7 +37,7 @@ "\t\telse", "\t\t\tarr[option]=1", "\t\tfi", - "\t\teval \\$arr_name='(\"\\${arr[@]}\")'", + "\t\teval \"\\$arr_name\"='(\"\\${arr[@]}\")'", "\t}", "", "\tlocal retval=\\$1", @@ -60,8 +59,9 @@ "\tdone", "", "\t# determine current screen position for overwriting the options", - "\tlocal lastrow=\\$(get_cursor_row)", - "\tlocal startrow=\\$((\\$lastrow - \\${#options[@]}))", + "\tlocal lastrow", + "\tlastrow=\\$(get_cursor_row)", + "\tlocal startrow=\\$((lastrow - \\${#options[@]}))", "", "\t# ensure cursor and input echoing back on upon a ctrl+c during read -s", "\ttrap \"cursor_blink_on; stty echo; printf '\\n'; exit\" 2", @@ -77,7 +77,7 @@ "\t\t\t\tprefix=\"[x]\"", "\t\t\tfi", "", - "\t\t\tcursor_to \\$((\\$startrow + \\$idx))", + "\t\t\tcursor_to \\$((startrow + idx))", "\t\t\tif [ \\$idx -eq \\$active ]; then", "\t\t\t\tprint_active \"\\$option\" \"\\$prefix\"", "\t\t\telse", @@ -93,24 +93,24 @@ "\t\t\tup) ((active--));", "\t\t\t\tif [ \\$active -lt 0 ]; then active=\\$((\\${#options[@]} - 1)); fi;;", "\t\t\tdown) ((active++));", - "\t\t\t\tif [ \\$active -ge \\${#options[@]} ]; then active=0; fi;;", + "\t\t\t\tif [ \"\\$active\" -ge \\${#options[@]} ]; then active=0; fi;;", "\t\tesac", "\tdone", "", "\t# cursor position back to normal", - "\tcursor_to \\$lastrow", + "\tcursor_to \"\\$lastrow\"", "\tprintf \"\\n\"", "\tcursor_blink_on", "", "\tindices=()", "\tfor((i=0;i<\\${#selected[@]};i++)); do", - "\t\tif ((\\${selected[i]} == 1)); then", - "\t\t\tindices+=(\\${i})", + "\t\tif ((selected[i] == 1)); then", + "\t\t\tindices+=(\"\\${i}\")", "\t\tfi", "\tdone", "", "\t# eval \\$retval='(\"\\${selected[@]}\")'", - "\teval \\$retval='(\"\\${indices[@]}\")'", + "\teval \"\\$retval\"='(\"\\${indices[@]}\")'", "}\n" ], "description": "provides a list of choices to user and returns the index of selected choices" diff --git a/nsroot/fn-fx/fn-math-average.json b/nsroot/fn-fx/fn-math-average.json index a3f257c..603bce2 100644 --- a/nsroot/fn-fx/fn-math-average.json +++ b/nsroot/fn-fx/fn-math-average.json @@ -4,7 +4,7 @@ "# Usage: average int1 int2 ...", "function average () {", "\tlocal sum=0", - "\tfor int in \\$@; do", + "\tfor int in \"\\$@\"; do", "\t\t((sum += int))", "\tdone", "\techo \\$((sum / \\$#))", diff --git a/nsroot/fn-fx/fn-math-fibonacci.json b/nsroot/fn-fx/fn-math-fibonacci.json index 5f2fa9f..9592389 100644 --- a/nsroot/fn-fx/fn-math-fibonacci.json +++ b/nsroot/fn-fx/fn-math-fibonacci.json @@ -5,7 +5,7 @@ "fibonacci ()", "{", "\tif ((\\$1 < 2)); then ", - "\t\techo \\$1", + "\t\techo \"\\$1\"", "\telse", "\t\techo \\$((\\$(fibonacci \\$((\\$1 - 1))) + \\$(fibonacci \\$((\\$1 - 2)))))", "\tfi", diff --git a/nsroot/fn-fx/fx-math-average.json b/nsroot/fn-fx/fx-math-average.json index a689f2c..5be64aa 100644 --- a/nsroot/fn-fx/fx-math-average.json +++ b/nsroot/fn-fx/fx-math-average.json @@ -2,7 +2,7 @@ "prefix": "fx math average", "body": [ "# Usage: average int1 int2 ...", - "result=\\$(average \\${${1:int1}\\} \\${${2:int2}\\} \\${${3:int3}\\})\n" + "result=\\$(average \"\\${${1:int1}\\}\" \"\\${${2:int2}\\}\" \"\\${${3:int3}\\}\")\n" ], "description": "call math average function" } \ No newline at end of file diff --git a/nsroot/fn-fx/fx-math-factorial.json b/nsroot/fn-fx/fx-math-factorial.json index 1f1b97a..90183d7 100644 --- a/nsroot/fn-fx/fx-math-factorial.json +++ b/nsroot/fn-fx/fx-math-factorial.json @@ -2,7 +2,8 @@ "prefix": "fx math factorial", "body": [ "# Usage: factorial n", - "result=\\$(factorial ${1:n})\n" + "readarray -t result < <(factorial ${1:n})", + "echo \"\\${result[@]\\}\"\n" ], "description": "calculate n!" } \ No newline at end of file diff --git a/nsroot/fn-fx/fx-math-fibonacci-series.json b/nsroot/fn-fx/fx-math-fibonacci-series.json index 3c8cb15..c99fa2c 100644 --- a/nsroot/fn-fx/fx-math-fibonacci-series.json +++ b/nsroot/fn-fx/fx-math-fibonacci-series.json @@ -2,7 +2,7 @@ "prefix": "fx math fibonacci series", "body": [ "# Usage: fibonacciSeries n", - "${1:result}=(\\$(fibonacciSeries ${2:n}))", + "readarray -t ${1:result} < <(fibonacciSeries ${2:n})", "echo \"\\${${1}[@]}\"\n" ], "description": "array of fibonacci series" diff --git a/nsroot/output/color-black.json b/nsroot/output/color-black.json index 2420083..7cbcba7 100644 --- a/nsroot/output/color-black.json +++ b/nsroot/output/color-black.json @@ -1,5 +1,5 @@ { "prefix": "color black", - "body": "echo \\$(tput setaf 0)\"${1:black text}\"\\$(tput sgr0)\n", + "body": "echo \"\\$(tput setaf 0)\"${1:black text}\"\\$(tput sgr0)\"\n", "description": "write in black" } \ No newline at end of file diff --git a/nsroot/output/color-blue.json b/nsroot/output/color-blue.json index 700923d..52727af 100644 --- a/nsroot/output/color-blue.json +++ b/nsroot/output/color-blue.json @@ -1,5 +1,5 @@ { "prefix": "color blue", - "body": "echo \\$(tput setaf 4)\"${1:blue text}\"\\$(tput sgr0)\n", + "body": "echo \"\\$(tput setaf 4)\"${1:blue text}\"\\$(tput sgr0)\"\n", "description": "write in blue" } \ No newline at end of file diff --git a/nsroot/output/color-cyan.json b/nsroot/output/color-cyan.json index ad97363..5ce4fe6 100644 --- a/nsroot/output/color-cyan.json +++ b/nsroot/output/color-cyan.json @@ -1,5 +1,5 @@ { "prefix": "color cyan", - "body": "echo \\$(tput setaf 6)\"${1:cyan text}\"\\$(tput sgr0)\n", + "body": "echo \"\\$(tput setaf 6)\"${1:cyan text}\"\\$(tput sgr0)\"\n", "description": "write in cyan" } \ No newline at end of file diff --git a/nsroot/output/color-green.json b/nsroot/output/color-green.json index b0a737a..c5b6f0b 100644 --- a/nsroot/output/color-green.json +++ b/nsroot/output/color-green.json @@ -1,5 +1,5 @@ { "prefix": "color green", - "body": "echo \\$(tput setaf 2)\"${1:green text}\"\\$(tput sgr0)\n", + "body": "echo \"\\$(tput setaf 2)\"${1:green text}\"\\$(tput sgr0)\"\n", "description": "write in green" } \ No newline at end of file diff --git a/nsroot/output/color-magenta.json b/nsroot/output/color-magenta.json index 56390aa..16bea2b 100644 --- a/nsroot/output/color-magenta.json +++ b/nsroot/output/color-magenta.json @@ -1,5 +1,5 @@ { "prefix": "color magenta", - "body": "echo \\$(tput setaf 5)\"${1:magenta text}\"\\$(tput sgr0)\n", + "body": "echo \"\\$(tput setaf 5)\"${1:magenta text}\"\\$(tput sgr0)\"\n", "description": "write in magenta" } \ No newline at end of file diff --git a/nsroot/output/color-red.json b/nsroot/output/color-red.json index a9e4fb1..6c2e2fe 100644 --- a/nsroot/output/color-red.json +++ b/nsroot/output/color-red.json @@ -1,5 +1,5 @@ { "prefix": "color red", - "body": "echo \\$(tput setaf 1)\"${1:red text}\"\\$(tput sgr0)\n", + "body": "echo \"\\$(tput setaf 1)\"${1:red text}\"\\$(tput sgr0)\"\n", "description": "write in red" } \ No newline at end of file diff --git a/nsroot/output/color-white.json b/nsroot/output/color-white.json index 62b6f09..fe90bcd 100644 --- a/nsroot/output/color-white.json +++ b/nsroot/output/color-white.json @@ -1,5 +1,5 @@ { "prefix": "color white", - "body": "echo \\$(tput setaf 7)\"${1:white text}\"\\$(tput sgr0)\n", + "body": "echo \"\\$(tput setaf 7)\"${1:white text}\"\\$(tput sgr0)\"\n", "description": "write in white" } \ No newline at end of file diff --git a/nsroot/output/color-yellow.json b/nsroot/output/color-yellow.json index 4154750..d3ec53f 100644 --- a/nsroot/output/color-yellow.json +++ b/nsroot/output/color-yellow.json @@ -1,5 +1,5 @@ { "prefix": "color yellow", - "body": "echo \\$(tput setaf 3)\"${1:yellow text}\"\\$(tput sgr0)\n", + "body": "echo \"\\$(tput setaf 3)\"${1:yellow text}\"\\$(tput sgr0)\"\n", "description": "write in yellow" } \ No newline at end of file diff --git a/nsroot/output/format-bold.json b/nsroot/output/format-bold.json index a9c8e51..b46859f 100644 --- a/nsroot/output/format-bold.json +++ b/nsroot/output/format-bold.json @@ -1,5 +1,5 @@ { "prefix": "format bold", - "body": "echo \\$(tput bold)\"${1:bold text}\"\\$(tput sgr0)\n", + "body": "echo \"\\$(tput bold)\"${1:bold text}\"\\$(tput sgr0)\"\n", "description": "write in bold" } \ No newline at end of file diff --git a/nsroot/output/format-dim.json b/nsroot/output/format-dim.json index 17eda1e..446657f 100644 --- a/nsroot/output/format-dim.json +++ b/nsroot/output/format-dim.json @@ -1,5 +1,5 @@ { "prefix": "format dim", - "body": "echo \\$(tput dim)\"${1:dimmed text}\"\\$(tput sgr0)\n", + "body": "echo \"\\$(tput dim)\"${1:dimmed text}\"\\$(tput sgr0)\"\n", "description": "write in dim" } \ No newline at end of file diff --git a/nsroot/output/format-italic.json b/nsroot/output/format-italic.json index 8d8c7b1..7820e47 100644 --- a/nsroot/output/format-italic.json +++ b/nsroot/output/format-italic.json @@ -1,5 +1,5 @@ { "prefix": "format italic", - "body": "echo \\$(tput sitm)\"${1:italic text}\"\\$(tput sgr0)\n", + "body": "echo \"\\$(tput sitm)\"${1:italic text}\"\\$(tput sgr0)\"\n", "description": "write in italic" } \ No newline at end of file diff --git a/nsroot/output/format-reverse.json b/nsroot/output/format-reverse.json index cdd4ad8..467a33b 100644 --- a/nsroot/output/format-reverse.json +++ b/nsroot/output/format-reverse.json @@ -1,5 +1,5 @@ { "prefix": "format reverse", - "body": "echo \\$(tput rev)\"${1:reversed text}\"\\$(tput sgr0)\n", + "body": "echo \"\\$(tput rev)\"${1:reversed text}\"\\$(tput sgr0)\"\n", "description": "write in reverse" } \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index e861830..6a0bfac 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,18 +1,18 @@ { "name": "shellman", - "version": "5.5.0", + "version": "5.5.1", "lockfileVersion": 2, "requires": true, "packages": { "": { - "version": "5.5.0", + "version": "5.5.1", "license": "SEE LICENSE IN LICENSE.md", "dependencies": { "ovsx": "0.2.0", - "vsce": "^1.93.0" + "vsce": "^1.95.0" }, "devDependencies": { - "cspell": "^5.6.4", + "cspell": "^5.6.6", "path": "^0.12.7" }, "engines": { @@ -117,9 +117,9 @@ } }, "node_modules/@cspell/cspell-bundled-dicts": { - "version": "5.6.4", - "resolved": "https://registry.npmjs.org/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-5.6.4.tgz", - "integrity": "sha512-0Q7byfMiLpUocALf8WWoQgYJpCY2fOyoH20AF1lhzPhHkoNXw0G0TisBIqinLI/c5sLsOFrZtH+kD1+cgF/b1A==", + "version": "5.6.6", + "resolved": "https://registry.npmjs.org/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-5.6.6.tgz", + "integrity": "sha512-am79SwDYrs0g1aLmtoZDWIj/IT070ISPoZabpTqnR58MFn0NGrLlF9yEKy3oVZtJhe10L3WWHreYZkdELLS9Sg==", "dev": true, "dependencies": { "@cspell/dict-ada": "^1.1.2", @@ -162,9 +162,9 @@ } }, "node_modules/@cspell/cspell-types": { - "version": "5.6.4", - "resolved": "https://registry.npmjs.org/@cspell/cspell-types/-/cspell-types-5.6.4.tgz", - "integrity": "sha512-7XoM1lakuwEJmKjXcZlqAgY1wzamrJGtKP8ZM9RzHYTfYoP/bJ8APViwVsQFpG1YyZ5K83F+vdvDkKjlRk1ZpA==", + "version": "5.6.5", + "resolved": "https://registry.npmjs.org/@cspell/cspell-types/-/cspell-types-5.6.5.tgz", + "integrity": "sha512-NCcMIelcQFwr2Yu9ma0buVBAFBlqtlxvAurV5UYmdaYyFv6bKO81HN9oMpu5DFev0ntOjZUSYdAGAhCUuikd3w==", "dev": true }, "node_modules/@cspell/dict-ada": { @@ -330,15 +330,15 @@ "dev": true }, "node_modules/@cspell/dict-powershell": { - "version": "1.0.16", - "resolved": "https://registry.npmjs.org/@cspell/dict-powershell/-/dict-powershell-1.0.16.tgz", - "integrity": "sha512-cbauyYR6H53gfd/J9B3wgly9kg1joLSVxxqbry+y0BqF7FBtkctnXev2WHRbX68o6X9iQPhUz6+3zGKwFW5Stg==", + "version": "1.0.17", + "resolved": "https://registry.npmjs.org/@cspell/dict-powershell/-/dict-powershell-1.0.17.tgz", + "integrity": "sha512-BwvfXcR3pdbDjkheBELH63CooWnTZ1k5+MZfU0xwdbrc+zKkEPnbO593Lk7KE2RNr//mD5Ye5P/JUgIv2xB7gA==", "dev": true }, "node_modules/@cspell/dict-python": { - "version": "1.0.35", - "resolved": "https://registry.npmjs.org/@cspell/dict-python/-/dict-python-1.0.35.tgz", - "integrity": "sha512-vVlx01SG8VjNHAQGaE/OGSShX1CoiXmdmCBsPX2sip6JmBluengGPtRPhpVLQOMxnXvTKg96eGtcnVRrYkVzag==", + "version": "1.0.36", + "resolved": "https://registry.npmjs.org/@cspell/dict-python/-/dict-python-1.0.36.tgz", + "integrity": "sha512-nB79GPLh2EgRpqzkkjj1zT5/au+RERvP3NwNlFcu+1juc+dU5bUZ13qtoO2gfhrobkuCwSjOG9MLgiqs/4/sJg==", "dev": true }, "node_modules/@cspell/dict-ruby": { @@ -653,17 +653,17 @@ } }, "node_modules/cspell": { - "version": "5.6.4", - "resolved": "https://registry.npmjs.org/cspell/-/cspell-5.6.4.tgz", - "integrity": "sha512-pdOvCv5Cn3mN+NPk10hZDI8Y8TDqZq//9lMC9r31xJJCqcUvWHz0FLbiEzqBbUwQJJ2KaCDUcOybZAsaRiY27w==", + "version": "5.6.6", + "resolved": "https://registry.npmjs.org/cspell/-/cspell-5.6.6.tgz", + "integrity": "sha512-4k3Jcz61mv5SQNjVcrWjARcEVa7gOF8nyg5MPU68AWPoyg5VuE51jgQDr4c01dbG/PGRLtrLwVmr+r6Kh5RDVA==", "dev": true, "dependencies": { - "@cspell/cspell-types": "^5.6.4", + "@cspell/cspell-types": "^5.6.5", "chalk": "^4.1.1", "commander": "^7.2.0", "comment-json": "^4.1.0", - "cspell-glob": "^5.6.4", - "cspell-lib": "^5.6.4", + "cspell-glob": "^5.6.5", + "cspell-lib": "^5.6.6", "fs-extra": "^10.0.0", "get-stdin": "^8.0.0", "glob": "^7.1.7", @@ -681,9 +681,9 @@ } }, "node_modules/cspell-glob": { - "version": "5.6.4", - "resolved": "https://registry.npmjs.org/cspell-glob/-/cspell-glob-5.6.4.tgz", - "integrity": "sha512-aSXLEOPGYAy/b97NNqw0jyB3T/JTwFtoh2n5lWisUHhqOufpcPnVbbZmX8UWIwFPs6fD4M0oFyhUCAMDg9sfhQ==", + "version": "5.6.5", + "resolved": "https://registry.npmjs.org/cspell-glob/-/cspell-glob-5.6.5.tgz", + "integrity": "sha512-bobER7IoYBJZCXxkiAc5FT1Tb55TFLf1vZSw0ORCFYMeMHlvYktwDx0Wo6/Nkz39MtMQ9nvLrepCMEEZNpKhVw==", "dev": true, "dependencies": { "micromatch": "^4.0.4" @@ -693,9 +693,9 @@ } }, "node_modules/cspell-io": { - "version": "5.6.4", - "resolved": "https://registry.npmjs.org/cspell-io/-/cspell-io-5.6.4.tgz", - "integrity": "sha512-N0jgFupRsVNKt/UXx3HwGeOQJU7W+IfIKoBP0PIZuJe7MsuT+YofpQYwLcNxEQ7n5sOqRlPvS/6qRL8epClGPw==", + "version": "5.6.5", + "resolved": "https://registry.npmjs.org/cspell-io/-/cspell-io-5.6.5.tgz", + "integrity": "sha512-OcnuiOkOetcWtihBF57fefLTNPHgsNEc7+x04U7hto3lwEWe8CFQfnkLbQIZfzXOyiyuPY2yjDO0/Y3oqWrB3A==", "dev": true, "dependencies": { "iconv-lite": "^0.6.3", @@ -706,20 +706,20 @@ } }, "node_modules/cspell-lib": { - "version": "5.6.4", - "resolved": "https://registry.npmjs.org/cspell-lib/-/cspell-lib-5.6.4.tgz", - "integrity": "sha512-54esfuMa+DTyvrRgsoo30E9u/sHH5QEB0yyQ5LeyzlxlTmaUq5kTE/gssH9jkwXt1gd4rmb8jfE55Y+tQkXWWg==", + "version": "5.6.6", + "resolved": "https://registry.npmjs.org/cspell-lib/-/cspell-lib-5.6.6.tgz", + "integrity": "sha512-Sum4U7/xWTJm99DeZF0bFBBN5SQ7roArlwnnKMmuRRcYl3s9/3OgtIK2YOOgqoSCxh4G51f7aal+bNAlAnx1bA==", "dev": true, "dependencies": { - "@cspell/cspell-bundled-dicts": "^5.6.4", - "@cspell/cspell-types": "^5.6.4", + "@cspell/cspell-bundled-dicts": "^5.6.6", + "@cspell/cspell-types": "^5.6.5", "clear-module": "^4.1.1", "comment-json": "^4.1.0", "configstore": "^5.0.1", "cosmiconfig": "^7.0.0", - "cspell-glob": "^5.6.4", - "cspell-io": "^5.6.4", - "cspell-trie-lib": "^5.6.4", + "cspell-glob": "^5.6.5", + "cspell-io": "^5.6.5", + "cspell-trie-lib": "^5.6.5", "find-up": "^5.0.0", "fs-extra": "^10.0.0", "gensequence": "^3.1.1", @@ -733,9 +733,9 @@ } }, "node_modules/cspell-trie-lib": { - "version": "5.6.4", - "resolved": "https://registry.npmjs.org/cspell-trie-lib/-/cspell-trie-lib-5.6.4.tgz", - "integrity": "sha512-5BFPqkRUZLk1OCUyHExUmHQTnrie4z1TMwXRk0Ur4nE7pZ90Mu7YrPnujyXt9RAo1Wh8REhTlQoZpN60wOrBJQ==", + "version": "5.6.5", + "resolved": "https://registry.npmjs.org/cspell-trie-lib/-/cspell-trie-lib-5.6.5.tgz", + "integrity": "sha512-x4Ii8LwFp7tt+Ie+5R/a/qgYn43R5RwRfByn3taMy4D++PgF+vHTVZm1yORmUFBPTIT39gFbtkAJR7X0kdBL/w==", "dev": true, "dependencies": { "fs-extra": "^10.0.0", @@ -1438,6 +1438,43 @@ "node": ">= 10" } }, + "node_modules/ovsx/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/ovsx/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/ovsx/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/ovsx/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, "node_modules/ovsx/node_modules/commander": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", @@ -1446,6 +1483,66 @@ "node": ">= 6" } }, + "node_modules/ovsx/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "engines": { + "node": ">=4" + } + }, + "node_modules/ovsx/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/ovsx/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/ovsx/node_modules/vsce": { + "version": "1.93.0", + "resolved": "https://registry.npmjs.org/vsce/-/vsce-1.93.0.tgz", + "integrity": "sha512-RgmxwybXenP6tTF0PLh97b/RRLp1RkzjAHNya3QAfv1EZVg+lfoBiAaXogpmOGjYr8OskkqP5tIa3D/Q6X9lrw==", + "dependencies": { + "azure-devops-node-api": "^10.2.2", + "chalk": "^2.4.2", + "cheerio": "^1.0.0-rc.9", + "commander": "^6.1.0", + "denodeify": "^1.2.1", + "glob": "^7.0.6", + "ignore": "^5.1.8", + "leven": "^3.1.0", + "lodash": "^4.17.15", + "markdown-it": "^10.0.0", + "mime": "^1.3.4", + "osenv": "^0.1.3", + "parse-semver": "^1.1.1", + "read": "^1.0.7", + "semver": "^5.1.0", + "tmp": "^0.2.1", + "typed-rest-client": "^1.8.4", + "url-join": "^1.1.0", + "yauzl": "^2.3.1", + "yazl": "^2.2.2" + }, + "bin": { + "vsce": "out/vsce" + }, + "engines": { + "node": ">= 10" + } + }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -1836,9 +1933,9 @@ "dev": true }, "node_modules/vsce": { - "version": "1.93.0", - "resolved": "https://registry.npmjs.org/vsce/-/vsce-1.93.0.tgz", - "integrity": "sha512-RgmxwybXenP6tTF0PLh97b/RRLp1RkzjAHNya3QAfv1EZVg+lfoBiAaXogpmOGjYr8OskkqP5tIa3D/Q6X9lrw==", + "version": "1.95.0", + "resolved": "https://registry.npmjs.org/vsce/-/vsce-1.95.0.tgz", + "integrity": "sha512-OiSrJRd9NT4t+MBVrTblHqo0pOGaoplHzEzSNOGnIsLxyRIqk4CYmoqUnjOrZf8DEalbALsFVTFbTJLeC1hAKA==", "dependencies": { "azure-devops-node-api": "^10.2.2", "chalk": "^2.4.2", @@ -1846,11 +1943,11 @@ "commander": "^6.1.0", "denodeify": "^1.2.1", "glob": "^7.0.6", - "ignore": "^5.1.8", "leven": "^3.1.0", "lodash": "^4.17.15", "markdown-it": "^10.0.0", "mime": "^1.3.4", + "minimatch": "^3.0.3", "osenv": "^0.1.3", "parse-semver": "^1.1.1", "read": "^1.0.7", @@ -2091,9 +2188,9 @@ } }, "@cspell/cspell-bundled-dicts": { - "version": "5.6.4", - "resolved": "https://registry.npmjs.org/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-5.6.4.tgz", - "integrity": "sha512-0Q7byfMiLpUocALf8WWoQgYJpCY2fOyoH20AF1lhzPhHkoNXw0G0TisBIqinLI/c5sLsOFrZtH+kD1+cgF/b1A==", + "version": "5.6.6", + "resolved": "https://registry.npmjs.org/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-5.6.6.tgz", + "integrity": "sha512-am79SwDYrs0g1aLmtoZDWIj/IT070ISPoZabpTqnR58MFn0NGrLlF9yEKy3oVZtJhe10L3WWHreYZkdELLS9Sg==", "dev": true, "requires": { "@cspell/dict-ada": "^1.1.2", @@ -2133,9 +2230,9 @@ } }, "@cspell/cspell-types": { - "version": "5.6.4", - "resolved": "https://registry.npmjs.org/@cspell/cspell-types/-/cspell-types-5.6.4.tgz", - "integrity": "sha512-7XoM1lakuwEJmKjXcZlqAgY1wzamrJGtKP8ZM9RzHYTfYoP/bJ8APViwVsQFpG1YyZ5K83F+vdvDkKjlRk1ZpA==", + "version": "5.6.5", + "resolved": "https://registry.npmjs.org/@cspell/cspell-types/-/cspell-types-5.6.5.tgz", + "integrity": "sha512-NCcMIelcQFwr2Yu9ma0buVBAFBlqtlxvAurV5UYmdaYyFv6bKO81HN9oMpu5DFev0ntOjZUSYdAGAhCUuikd3w==", "dev": true }, "@cspell/dict-ada": { @@ -2301,15 +2398,15 @@ "dev": true }, "@cspell/dict-powershell": { - "version": "1.0.16", - "resolved": "https://registry.npmjs.org/@cspell/dict-powershell/-/dict-powershell-1.0.16.tgz", - "integrity": "sha512-cbauyYR6H53gfd/J9B3wgly9kg1joLSVxxqbry+y0BqF7FBtkctnXev2WHRbX68o6X9iQPhUz6+3zGKwFW5Stg==", + "version": "1.0.17", + "resolved": "https://registry.npmjs.org/@cspell/dict-powershell/-/dict-powershell-1.0.17.tgz", + "integrity": "sha512-BwvfXcR3pdbDjkheBELH63CooWnTZ1k5+MZfU0xwdbrc+zKkEPnbO593Lk7KE2RNr//mD5Ye5P/JUgIv2xB7gA==", "dev": true }, "@cspell/dict-python": { - "version": "1.0.35", - "resolved": "https://registry.npmjs.org/@cspell/dict-python/-/dict-python-1.0.35.tgz", - "integrity": "sha512-vVlx01SG8VjNHAQGaE/OGSShX1CoiXmdmCBsPX2sip6JmBluengGPtRPhpVLQOMxnXvTKg96eGtcnVRrYkVzag==", + "version": "1.0.36", + "resolved": "https://registry.npmjs.org/@cspell/dict-python/-/dict-python-1.0.36.tgz", + "integrity": "sha512-nB79GPLh2EgRpqzkkjj1zT5/au+RERvP3NwNlFcu+1juc+dU5bUZ13qtoO2gfhrobkuCwSjOG9MLgiqs/4/sJg==", "dev": true }, "@cspell/dict-ruby": { @@ -2564,17 +2661,17 @@ "dev": true }, "cspell": { - "version": "5.6.4", - "resolved": "https://registry.npmjs.org/cspell/-/cspell-5.6.4.tgz", - "integrity": "sha512-pdOvCv5Cn3mN+NPk10hZDI8Y8TDqZq//9lMC9r31xJJCqcUvWHz0FLbiEzqBbUwQJJ2KaCDUcOybZAsaRiY27w==", + "version": "5.6.6", + "resolved": "https://registry.npmjs.org/cspell/-/cspell-5.6.6.tgz", + "integrity": "sha512-4k3Jcz61mv5SQNjVcrWjARcEVa7gOF8nyg5MPU68AWPoyg5VuE51jgQDr4c01dbG/PGRLtrLwVmr+r6Kh5RDVA==", "dev": true, "requires": { - "@cspell/cspell-types": "^5.6.4", + "@cspell/cspell-types": "^5.6.5", "chalk": "^4.1.1", "commander": "^7.2.0", "comment-json": "^4.1.0", - "cspell-glob": "^5.6.4", - "cspell-lib": "^5.6.4", + "cspell-glob": "^5.6.5", + "cspell-lib": "^5.6.6", "fs-extra": "^10.0.0", "get-stdin": "^8.0.0", "glob": "^7.1.7", @@ -2583,18 +2680,18 @@ } }, "cspell-glob": { - "version": "5.6.4", - "resolved": "https://registry.npmjs.org/cspell-glob/-/cspell-glob-5.6.4.tgz", - "integrity": "sha512-aSXLEOPGYAy/b97NNqw0jyB3T/JTwFtoh2n5lWisUHhqOufpcPnVbbZmX8UWIwFPs6fD4M0oFyhUCAMDg9sfhQ==", + "version": "5.6.5", + "resolved": "https://registry.npmjs.org/cspell-glob/-/cspell-glob-5.6.5.tgz", + "integrity": "sha512-bobER7IoYBJZCXxkiAc5FT1Tb55TFLf1vZSw0ORCFYMeMHlvYktwDx0Wo6/Nkz39MtMQ9nvLrepCMEEZNpKhVw==", "dev": true, "requires": { "micromatch": "^4.0.4" } }, "cspell-io": { - "version": "5.6.4", - "resolved": "https://registry.npmjs.org/cspell-io/-/cspell-io-5.6.4.tgz", - "integrity": "sha512-N0jgFupRsVNKt/UXx3HwGeOQJU7W+IfIKoBP0PIZuJe7MsuT+YofpQYwLcNxEQ7n5sOqRlPvS/6qRL8epClGPw==", + "version": "5.6.5", + "resolved": "https://registry.npmjs.org/cspell-io/-/cspell-io-5.6.5.tgz", + "integrity": "sha512-OcnuiOkOetcWtihBF57fefLTNPHgsNEc7+x04U7hto3lwEWe8CFQfnkLbQIZfzXOyiyuPY2yjDO0/Y3oqWrB3A==", "dev": true, "requires": { "iconv-lite": "^0.6.3", @@ -2602,20 +2699,20 @@ } }, "cspell-lib": { - "version": "5.6.4", - "resolved": "https://registry.npmjs.org/cspell-lib/-/cspell-lib-5.6.4.tgz", - "integrity": "sha512-54esfuMa+DTyvrRgsoo30E9u/sHH5QEB0yyQ5LeyzlxlTmaUq5kTE/gssH9jkwXt1gd4rmb8jfE55Y+tQkXWWg==", + "version": "5.6.6", + "resolved": "https://registry.npmjs.org/cspell-lib/-/cspell-lib-5.6.6.tgz", + "integrity": "sha512-Sum4U7/xWTJm99DeZF0bFBBN5SQ7roArlwnnKMmuRRcYl3s9/3OgtIK2YOOgqoSCxh4G51f7aal+bNAlAnx1bA==", "dev": true, "requires": { - "@cspell/cspell-bundled-dicts": "^5.6.4", - "@cspell/cspell-types": "^5.6.4", + "@cspell/cspell-bundled-dicts": "^5.6.6", + "@cspell/cspell-types": "^5.6.5", "clear-module": "^4.1.1", "comment-json": "^4.1.0", "configstore": "^5.0.1", "cosmiconfig": "^7.0.0", - "cspell-glob": "^5.6.4", - "cspell-io": "^5.6.4", - "cspell-trie-lib": "^5.6.4", + "cspell-glob": "^5.6.5", + "cspell-io": "^5.6.5", + "cspell-trie-lib": "^5.6.5", "find-up": "^5.0.0", "fs-extra": "^10.0.0", "gensequence": "^3.1.1", @@ -2626,9 +2723,9 @@ } }, "cspell-trie-lib": { - "version": "5.6.4", - "resolved": "https://registry.npmjs.org/cspell-trie-lib/-/cspell-trie-lib-5.6.4.tgz", - "integrity": "sha512-5BFPqkRUZLk1OCUyHExUmHQTnrie4z1TMwXRk0Ur4nE7pZ90Mu7YrPnujyXt9RAo1Wh8REhTlQoZpN60wOrBJQ==", + "version": "5.6.5", + "resolved": "https://registry.npmjs.org/cspell-trie-lib/-/cspell-trie-lib-5.6.5.tgz", + "integrity": "sha512-x4Ii8LwFp7tt+Ie+5R/a/qgYn43R5RwRfByn3taMy4D++PgF+vHTVZm1yORmUFBPTIT39gFbtkAJR7X0kdBL/w==", "dev": true, "requires": { "fs-extra": "^10.0.0", @@ -3137,10 +3234,86 @@ "vsce": "~1.93.0" }, "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, "commander": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==" + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "requires": { + "has-flag": "^3.0.0" + } + }, + "vsce": { + "version": "1.93.0", + "resolved": "https://registry.npmjs.org/vsce/-/vsce-1.93.0.tgz", + "integrity": "sha512-RgmxwybXenP6tTF0PLh97b/RRLp1RkzjAHNya3QAfv1EZVg+lfoBiAaXogpmOGjYr8OskkqP5tIa3D/Q6X9lrw==", + "requires": { + "azure-devops-node-api": "^10.2.2", + "chalk": "^2.4.2", + "cheerio": "^1.0.0-rc.9", + "commander": "^6.1.0", + "denodeify": "^1.2.1", + "glob": "^7.0.6", + "ignore": "^5.1.8", + "leven": "^3.1.0", + "lodash": "^4.17.15", + "markdown-it": "^10.0.0", + "mime": "^1.3.4", + "osenv": "^0.1.3", + "parse-semver": "^1.1.1", + "read": "^1.0.7", + "semver": "^5.1.0", + "tmp": "^0.2.1", + "typed-rest-client": "^1.8.4", + "url-join": "^1.1.0", + "yauzl": "^2.3.1", + "yazl": "^2.2.2" + } } } }, @@ -3445,9 +3618,9 @@ } }, "vsce": { - "version": "1.93.0", - "resolved": "https://registry.npmjs.org/vsce/-/vsce-1.93.0.tgz", - "integrity": "sha512-RgmxwybXenP6tTF0PLh97b/RRLp1RkzjAHNya3QAfv1EZVg+lfoBiAaXogpmOGjYr8OskkqP5tIa3D/Q6X9lrw==", + "version": "1.95.0", + "resolved": "https://registry.npmjs.org/vsce/-/vsce-1.95.0.tgz", + "integrity": "sha512-OiSrJRd9NT4t+MBVrTblHqo0pOGaoplHzEzSNOGnIsLxyRIqk4CYmoqUnjOrZf8DEalbALsFVTFbTJLeC1hAKA==", "requires": { "azure-devops-node-api": "^10.2.2", "chalk": "^2.4.2", @@ -3455,11 +3628,11 @@ "commander": "^6.1.0", "denodeify": "^1.2.1", "glob": "^7.0.6", - "ignore": "^5.1.8", "leven": "^3.1.0", "lodash": "^4.17.15", "markdown-it": "^10.0.0", "mime": "^1.3.4", + "minimatch": "^3.0.3", "osenv": "^0.1.3", "parse-semver": "^1.1.1", "read": "^1.0.7", diff --git a/package.json b/package.json index bdd05b4..8cc6969 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "shellman", "displayName": "shellman", "description": "Shell script snippet", - "version": "5.5.0", + "version": "5.5.1", "publisher": "Remisa", "icon": "images/icon.png", "license": "SEE LICENSE IN LICENSE.md", @@ -29,7 +29,7 @@ ] }, "devDependencies": { - "cspell": "^5.6.4", + "cspell": "^5.6.6", "path": "^0.12.7" }, "scripts": { @@ -39,6 +39,6 @@ }, "dependencies": { "ovsx": "0.2.0", - "vsce": "^1.93.0" + "vsce": "^1.95.0" } } diff --git a/snippets/snippets.json b/snippets/snippets.json index 4e39745..fc07da8 100755 --- a/snippets/snippets.json +++ b/snippets/snippets.json @@ -598,11 +598,11 @@ "", "\t((lastIndex=\\${#frames[@]} - 1))", "\tlocal mode=\\${frames[lastIndex]}", - "\tunset frames[lastIndex]", + "\tunset \"frames[lastIndex]\"", "", "\t((lastIndex=\\${#frames[@]} - 1))", "\tlocal interval=\\${frames[lastIndex]}", - "\tunset frames[lastIndex]", + "\tunset \"frames[lastIndex]\"", "", "\t# Comment out next two lines if you are using CTRL+C event handler.", "${1:\ttrap 'tput cnorm; echo' EXIT\n\ttrap 'exit 127' HUP INT TERM}\n", @@ -616,8 +616,8 @@ "\tmax=\"\\${#frames[@]}\"", "\tindices=()", "\tdirection=\"forward\"", - "\tforwardIndices=( \\$(seq 0 1 \"\\${max}\") )", - "\tbackwardIndices=( \\$(seq \"\\${max}\" -1 0) )", + "\treadarray -t forwardIndices < <(seq 0 1 \"\\${max}\")", + "\treadarray -t backwardIndices < <(seq \"\\${max}\" -1 0)", "", "\twhile true; do", "\t\tif [ \"\\${mode}\" = \"circular\" ]; then", @@ -712,7 +712,8 @@ "\t\t;;", "\tesac\n", "\tlocal msg=\"\\${3\\} \\${1\\} \\${3\\}\"", - "\tlocal edge=\\$(echo \"\\${msg}\" | sed \"s/./\\${3}/g\")", + "\tlocal edge", + "\tedge=\\${msg//?/\\$3\\}", "\ttput setaf \\${color\\}", "\ttput bold", "\techo \"\\${edge}\"", @@ -730,7 +731,8 @@ "# Usage: bannerSimple \"my title\" \"*\"", "function bannerSimple() {", "\tlocal msg=\"\\${2\\} \\${1\\} \\${2\\}\"", - "\tlocal edge=\\$(echo \"\\${msg\\}\" | sed \"s/./\"\\${2}\"/g\")", + "\tlocal edge", + "\tedge=\\${msg//?/\\$2\\}", "\techo \"\\${edge\\}\"", "\techo \"\\$(tput bold)\\${msg\\}\\$(tput sgr0)\"", "\techo \"\\${edge\\}\"", @@ -764,27 +766,28 @@ "# Usage: options=(\"one\" \"two\" \"three\"); inputChoice \"Choose:\" 1 \"\\${options[@]}\"; choice=\\$?; echo \"\\${options[\\$choice]}\"", "function inputChoice() {", "\techo \"\\${1\\}\"; shift", - "\techo \\$(tput dim)-\"Change option: [up/down], Select: [ENTER]\" \\$(tput sgr0)", + "\techo \"\\$(tput dim)\"\"- Change option: [up/down], Select: [ENTER]\" \"\\$(tput sgr0)\"", "\tlocal selected=\"\\${1\\}\"; shift\n", "\tESC=\\$(echo -e \"\\033\")", "\tcursor_blink_on() { tput cnorm; }", "\tcursor_blink_off() { tput civis; }", "\tcursor_to() { tput cup \\$((\\$1-1)); }", - "\tprint_option() { echo \\$(tput sgr0) \"\\$1\" \\$(tput sgr0); }", - "\tprint_selected() { echo \\$(tput rev) \"\\$1\" \\$(tput sgr0); }", - "\tget_cursor_row() { IFS=';' read -sdR -p \\$'\\E[6n' ROW COL; echo \\${ROW#*[}; }", - "\tkey_input() { read -s -n3 key 2>/dev/null >&2; [[ \\$key = \\$ESC[A ]] && echo up; [[ \\$key = \\$ESC[B ]] && echo down; [[ \\$key = \"\" ]] && echo enter; }\n", + "\tprint_option() { echo \"\\$(tput sgr0)\" \"\\$1\" \"\\$(tput sgr0)\"; }", + "\tprint_selected() { echo \"\\$(tput rev)\" \"\\$1\" \"\\$(tput sgr0)\"; }", + "\tget_cursor_row() { IFS=';' read -rsdR -p \\$'\\E[6n' ROW COL; echo \"\\${ROW#*[}\"; }", + "\tkey_input() { read -rs -n3 key 2>/dev/null >&2; [[ \\$key = \\${ESC}[A ]] && echo up; [[ \\$key = \\${ESC}[B ]] && echo down; [[ \\$key = \"\" ]] && echo enter; }\n", "\tfor opt; do echo; done\n", - "\tlocal lastrow=\\$(get_cursor_row)", - "\tlocal startrow=\\$((\\$lastrow - \\$#))", + "\tlocal lastrow", + "\tlastrow=\\$(get_cursor_row)", + "\tlocal startrow=\\$((lastrow - \\$#))", "\ttrap \"cursor_blink_on; echo; echo; exit\" 2", "\tcursor_blink_off\n", "\t: selected:=0\n", "\twhile true; do", "\t\tlocal idx=0", "\t\tfor opt; do", - "\t\t\tcursor_to \\$((\\$startrow + \\$idx))", - "\t\t\tif [ \\${idx\\} -eq \\${selected\\} ]; then", + "\t\t\tcursor_to \\$((startrow + idx))", + "\t\t\tif [ \\${idx\\} -eq \"\\${selected\\}\" ]; then", "\t\t\t\tprint_selected \"\\${opt\\}\"", "\t\t\telse", "\t\t\t\tprint_option \"\\${opt\\}\"", @@ -813,18 +816,17 @@ "body": [ "# Usage: multiChoice \"header message\" resultArray \"comma separated options\" \"comma separated default values\"", "# Credit: https://serverfault.com/a/949806", - "# TODO: 1) Refactoring to return result array 2) Get input options as array", "function multiChoice {", "\techo \"\\${1\\}\"; shift", - "\techo \\$(tput dim)-\"Change Option: [up/down], Change Selection: [space], Done: [ENTER]\" \\$(tput sgr0)", + "\techo \"\\$(tput dim)\"\"- Change Option: [up/down], Change Selection: [space], Done: [ENTER]\" \"\\$(tput sgr0)\"", "\t# little helpers for terminal print control and key input", "\tESC=\\$( printf \"\\033\")", - "\tcursor_blink_on() { printf \"\\$ESC[?25h\"; }", - "\tcursor_blink_off() { printf \"\\$ESC[?25l\"; }", - "\tcursor_to() { printf \"\\$ESC[\\$1;\\${2:-1}H\"; }", - "\tprint_inactive() { printf \"\\$2 \\$1 \"; }", - "\tprint_active() { printf \"\\$2 \\$ESC[7m \\$1 \\$ESC[27m\"; }", - "\tget_cursor_row() { IFS=';' read -sdR -p \\$'\\E[6n' ROW COL; echo \\${ROW#*[}; }", + "\tcursor_blink_on() { printf \"%s\" \"\\${ESC}[?25h\"; }", + "\tcursor_blink_off() { printf \"%s\" \"\\${ESC}[?25l\"; }", + "\tcursor_to() { printf \"%s\" \"\\${ESC}[\\$1;\\${2:-1}H\"; }", + "\tprint_inactive() { printf \"%s %s \" \"\\$2\" \"\\$1\"; }", + "\tprint_active() { printf \"%s \\${ESC}[7m \\$1 \\${ESC}[27m\" \"\\$2\"; }", + "\tget_cursor_row() { IFS=';' read -rsdR -p \\$'\\E[6n' ROW COL; echo \"\\${ROW#*[}\"; }", "\tkey_input() {", "\t\tlocal key", "\t\tIFS= read -rsn1 key 2>/dev/null >&2", @@ -845,7 +847,7 @@ "\t\telse", "\t\t\tarr[option]=1", "\t\tfi", - "\t\teval \\$arr_name='(\"\\${arr[@]}\")'", + "\t\teval \"\\$arr_name\"='(\"\\${arr[@]}\")'", "\t}", "", "\tlocal retval=\\$1", @@ -867,8 +869,9 @@ "\tdone", "", "\t# determine current screen position for overwriting the options", - "\tlocal lastrow=\\$(get_cursor_row)", - "\tlocal startrow=\\$((\\$lastrow - \\${#options[@]}))", + "\tlocal lastrow", + "\tlastrow=\\$(get_cursor_row)", + "\tlocal startrow=\\$((lastrow - \\${#options[@]}))", "", "\t# ensure cursor and input echoing back on upon a ctrl+c during read -s", "\ttrap \"cursor_blink_on; stty echo; printf '\\n'; exit\" 2", @@ -884,7 +887,7 @@ "\t\t\t\tprefix=\"[x]\"", "\t\t\tfi", "", - "\t\t\tcursor_to \\$((\\$startrow + \\$idx))", + "\t\t\tcursor_to \\$((startrow + idx))", "\t\t\tif [ \\$idx -eq \\$active ]; then", "\t\t\t\tprint_active \"\\$option\" \"\\$prefix\"", "\t\t\telse", @@ -900,24 +903,24 @@ "\t\t\tup) ((active--));", "\t\t\t\tif [ \\$active -lt 0 ]; then active=\\$((\\${#options[@]} - 1)); fi;;", "\t\t\tdown) ((active++));", - "\t\t\t\tif [ \\$active -ge \\${#options[@]} ]; then active=0; fi;;", + "\t\t\t\tif [ \"\\$active\" -ge \\${#options[@]} ]; then active=0; fi;;", "\t\tesac", "\tdone", "", "\t# cursor position back to normal", - "\tcursor_to \\$lastrow", + "\tcursor_to \"\\$lastrow\"", "\tprintf \"\\n\"", "\tcursor_blink_on", "", "\tindices=()", "\tfor((i=0;i<\\${#selected[@]};i++)); do", - "\t\tif ((\\${selected[i]} == 1)); then", - "\t\t\tindices+=(\\${i})", + "\t\tif ((selected[i] == 1)); then", + "\t\t\tindices+=(\"\\${i}\")", "\t\tfi", "\tdone", "", "\t# eval \\$retval='(\"\\${selected[@]}\")'", - "\teval \\$retval='(\"\\${indices[@]}\")'", + "\teval \"\\$retval\"='(\"\\${indices[@]}\")'", "}\n" ], "description": "provides a list of choices to user and returns the index of selected choices" @@ -928,7 +931,7 @@ "# Usage: average int1 int2 ...", "function average () {", "\tlocal sum=0", - "\tfor int in \\$@; do", + "\tfor int in \"\\$@\"; do", "\t\t((sum += int))", "\tdone", "\techo \\$((sum / \\$#))", @@ -977,7 +980,7 @@ "fibonacci ()", "{", "\tif ((\\$1 < 2)); then ", - "\t\techo \\$1", + "\t\techo \"\\$1\"", "\telse", "\t\techo \\$((\\$(fibonacci \\$((\\$1 - 1))) + \\$(fibonacci \\$((\\$1 - 2)))))", "\tfi", @@ -1212,7 +1215,7 @@ "prefix": "fx math average", "body": [ "# Usage: average int1 int2 ...", - "result=\\$(average \\${${1:int1}\\} \\${${2:int2}\\} \\${${3:int3}\\})\n" + "result=\\$(average \"\\${${1:int1}\\}\" \"\\${${2:int2}\\}\" \"\\${${3:int3}\\}\")\n" ], "description": "call math average function" }, @@ -1220,7 +1223,8 @@ "prefix": "fx math factorial", "body": [ "# Usage: factorial n", - "result=\\$(factorial ${1:n})\n" + "readarray -t result < <(factorial ${1:n})", + "echo \"\\${result[@]\\}\"\n" ], "description": "calculate n!" }, @@ -1228,7 +1232,7 @@ "prefix": "fx math fibonacci series", "body": [ "# Usage: fibonacciSeries n", - "${1:result}=(\\$(fibonacciSeries ${2:n}))", + "readarray -t ${1:result} < <(fibonacciSeries ${2:n})", "echo \"\\${${1}[@]}\"\n" ], "description": "array of fibonacci series" @@ -2046,62 +2050,62 @@ }, "output.color-black": { "prefix": "color black", - "body": "echo \\$(tput setaf 0)\"${1:black text}\"\\$(tput sgr0)\n", + "body": "echo \"\\$(tput setaf 0)\"${1:black text}\"\\$(tput sgr0)\"\n", "description": "write in black" }, "output.color-blue": { "prefix": "color blue", - "body": "echo \\$(tput setaf 4)\"${1:blue text}\"\\$(tput sgr0)\n", + "body": "echo \"\\$(tput setaf 4)\"${1:blue text}\"\\$(tput sgr0)\"\n", "description": "write in blue" }, "output.color-cyan": { "prefix": "color cyan", - "body": "echo \\$(tput setaf 6)\"${1:cyan text}\"\\$(tput sgr0)\n", + "body": "echo \"\\$(tput setaf 6)\"${1:cyan text}\"\\$(tput sgr0)\"\n", "description": "write in cyan" }, "output.color-green": { "prefix": "color green", - "body": "echo \\$(tput setaf 2)\"${1:green text}\"\\$(tput sgr0)\n", + "body": "echo \"\\$(tput setaf 2)\"${1:green text}\"\\$(tput sgr0)\"\n", "description": "write in green" }, "output.color-magenta": { "prefix": "color magenta", - "body": "echo \\$(tput setaf 5)\"${1:magenta text}\"\\$(tput sgr0)\n", + "body": "echo \"\\$(tput setaf 5)\"${1:magenta text}\"\\$(tput sgr0)\"\n", "description": "write in magenta" }, "output.color-red": { "prefix": "color red", - "body": "echo \\$(tput setaf 1)\"${1:red text}\"\\$(tput sgr0)\n", + "body": "echo \"\\$(tput setaf 1)\"${1:red text}\"\\$(tput sgr0)\"\n", "description": "write in red" }, "output.color-white": { "prefix": "color white", - "body": "echo \\$(tput setaf 7)\"${1:white text}\"\\$(tput sgr0)\n", + "body": "echo \"\\$(tput setaf 7)\"${1:white text}\"\\$(tput sgr0)\"\n", "description": "write in white" }, "output.color-yellow": { "prefix": "color yellow", - "body": "echo \\$(tput setaf 3)\"${1:yellow text}\"\\$(tput sgr0)\n", + "body": "echo \"\\$(tput setaf 3)\"${1:yellow text}\"\\$(tput sgr0)\"\n", "description": "write in yellow" }, "output.format-bold": { "prefix": "format bold", - "body": "echo \\$(tput bold)\"${1:bold text}\"\\$(tput sgr0)\n", + "body": "echo \"\\$(tput bold)\"${1:bold text}\"\\$(tput sgr0)\"\n", "description": "write in bold" }, "output.format-dim": { "prefix": "format dim", - "body": "echo \\$(tput dim)\"${1:dimmed text}\"\\$(tput sgr0)\n", + "body": "echo \"\\$(tput dim)\"${1:dimmed text}\"\\$(tput sgr0)\"\n", "description": "write in dim" }, "output.format-italic": { "prefix": "format italic", - "body": "echo \\$(tput sitm)\"${1:italic text}\"\\$(tput sgr0)\n", + "body": "echo \"\\$(tput sitm)\"${1:italic text}\"\\$(tput sgr0)\"\n", "description": "write in italic" }, "output.format-reverse": { "prefix": "format reverse", - "body": "echo \\$(tput rev)\"${1:reversed text}\"\\$(tput sgr0)\n", + "body": "echo \"\\$(tput rev)\"${1:reversed text}\"\\$(tput sgr0)\"\n", "description": "write in reverse" }, "process.process-id": {