generate completions for elvish and fish (#3015)

This commit is contained in:
Adam C. Stephens 2024-09-03 19:50:59 -04:00 committed by GitHub
parent 399a1c0c52
commit 1161da69ef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 27 additions and 43 deletions

View file

@ -41,6 +41,7 @@
- Anton Loukianov (antonl)
- fossdd
- Wei Jian Gan (weijiangan)
- adamcstephens
## Acknowledgements

View file

@ -31,18 +31,13 @@ fn main() {
std::fs::create_dir(&comp_dir).expect("Unable to create completions dir");
}
generate_to(
Shell::Bash,
&mut KanidmdParser::command(),
"kanidmd",
comp_dir.clone(),
)
.ok();
generate_to(
Shell::Zsh,
&mut KanidmdParser::command(),
"kanidmd",
comp_dir,
)
.ok();
for shell in [Shell::Bash, Shell::Elvish, Shell::Fish, Shell::Zsh] {
generate_to(
shell,
&mut KanidmdParser::command(),
"kanidmd",
comp_dir.clone(),
)
.ok();
}
}

View file

@ -34,7 +34,7 @@ fn main() -> Result<(), Error> {
std::fs::create_dir(&comp_dir).expect("Unable to create completions dir");
}
for shell in [Shell::Bash, Shell::Zsh] {
for shell in [Shell::Bash, Shell::Elvish, Shell::Fish, Shell::Zsh] {
generate_to(
shell,
&mut SshAuthorizedOpt::command(),

View file

@ -30,33 +30,21 @@ fn main() {
std::fs::create_dir(&comp_dir).expect("Unable to create completions dir");
}
generate_to(
Shell::Bash,
&mut SshAuthorizedOpt::command(),
"kanidm_ssh_authorizedkeys",
comp_dir.clone(),
)
.ok();
generate_to(
Shell::Zsh,
&mut SshAuthorizedOpt::command(),
"kanidm_ssh_authorizedkeys",
comp_dir.clone(),
)
.ok();
for shell in [Shell::Bash, Shell::Elvish, Shell::Fish, Shell::Zsh] {
generate_to(
shell,
&mut SshAuthorizedOpt::command(),
"kanidm_ssh_authorizedkeys",
comp_dir.clone(),
)
.ok();
generate_to(
Shell::Zsh,
&mut KanidmUnixParser::command(),
"kanidm_unix",
comp_dir.clone(),
)
.ok();
generate_to(
Shell::Bash,
&mut KanidmUnixParser::command(),
"kanidm_unix",
comp_dir,
)
.ok();
generate_to(
shell,
&mut KanidmUnixParser::command(),
"kanidm_unix",
comp_dir.clone(),
)
.ok();
}
}