mysql-admutils: fix generated completions
All checks were successful
All checks were successful
There is a bug in clap dynamic completions, where it does not account for alternative binary names. This hack should fix it for now
This commit is contained in:
@@ -18,6 +18,10 @@ mkdir -p assets/completions
|
||||
COMPLETE=bash mysql-useradm > assets/completions/mysql-useradm.bash
|
||||
COMPLETE=zsh mysql-useradm > assets/completions/_mysql-useradm
|
||||
COMPLETE=fish mysql-useradm > assets/completions/mysql-useradm.fish
|
||||
|
||||
# See https://github.com/clap-rs/clap/issues/1764
|
||||
sed -i 's/muscl/mysql-dbadm/g' assets/completions/{mysql-dbadm.bash,mysql-dbadm.fish,_mysql-dbadm}
|
||||
sed -i 's/muscl/mysql-useradm/g' assets/completions/{mysql-useradm.bash,mysql-useradm.fish,_mysql-useradm}
|
||||
)
|
||||
|
||||
cargo deb
|
||||
|
||||
@@ -29,6 +29,9 @@ buildFunction {
|
||||
export PATH="$out/bin:$PATH"
|
||||
export COMPLETE="${shell}"
|
||||
"${command}" > "$TMP/${command}.${shell}"
|
||||
|
||||
# See https://github.com/clap-rs/clap/issues/1764
|
||||
sed -i 's/muscl/${command}/g' "$TMP/${command}.${shell}"
|
||||
)
|
||||
installShellCompletion "--${shell}" --cmd "${command}" "$TMP/${command}.${shell}"
|
||||
'') {
|
||||
|
||||
Reference in New Issue
Block a user