Skip to content

Commit

Permalink
fix: make task completion script POSIX
Browse files Browse the repository at this point in the history
Fixes #3507
  • Loading branch information
jdx committed Dec 12, 2024
1 parent beb255c commit b92b560
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion completions/mise.bash
Original file line number Diff line number Diff line change
Expand Up @@ -3489,7 +3489,7 @@ _mise() {
local cur prev words cword was_split comp_args
_comp_initialize -n : -- "$@" || return
# shellcheck disable=SC2207
_comp_compgen -- -W "$(@usage complete-word --shell bash -s "${spec_variable}" --cword="$cword" -- "${words[@]}")"
_comp_compgen -- -W "$(usage complete-word --shell bash -s "${spec_variable}" --cword="$cword" -- "${words[@]}")"
_comp_ltrim_colon_completions "$cur"
# shellcheck disable=SC2181
if [[ $? -ne 0 ]]; then
Expand Down
2 changes: 1 addition & 1 deletion mise.lock
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ version = "0.6.0"
version = "2.7.0"

[tools."cargo:usage-cli"]
version = "1.5.0"
version = "1.5.2"

[tools.cosign]
version = "2.4.1"
Expand Down
2 changes: 1 addition & 1 deletion mise.usage.kdl
Original file line number Diff line number Diff line change
Expand Up @@ -1855,7 +1855,7 @@ complete "plugin" run="mise plugins --core --user"
complete "prefix" run="mise ls-remote {{words[PREV]}}"
complete "setting" run="mise settings --keys"
complete "task" run=r#"
mise tasks --json | jq '.[] | (.name | sub(":"; "\\\:")) + ":" + (.description | sub(":"; "\\\:"))'
mise tasks --json | jq '.[] | (.name | sub(":"; "\\:")) + ":" + (.description | sub(":"; "\\:"))'
"# descriptions=true

complete "tool@version" run=r#"
Expand Down
2 changes: 1 addition & 1 deletion src/assets/mise-extra.usage.kdl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ complete "plugin" run="mise plugins --core --user"
complete "prefix" run="mise ls-remote {{words[PREV]}}"
complete "setting" run="mise settings --keys"
complete "task" run=r#"
mise tasks --json | jq '.[] | (.name | sub(":"; "\\\:")) + ":" + (.description | sub(":"; "\\\:"))'
mise tasks --json | jq '.[] | (.name | sub(":"; "\\:")) + ":" + (.description | sub(":"; "\\:"))'
"# descriptions=true

complete "tool@version" run=r#"
Expand Down

0 comments on commit b92b560

Please sign in to comment.