mirror of
https://github.com/kanidm/kanidm.git
synced 2025-02-23 12:37:00 +01:00
generate completions for elvish and fish (#3015)
This commit is contained in:
parent
399a1c0c52
commit
1161da69ef
|
@ -41,6 +41,7 @@
|
||||||
- Anton Loukianov (antonl)
|
- Anton Loukianov (antonl)
|
||||||
- fossdd
|
- fossdd
|
||||||
- Wei Jian Gan (weijiangan)
|
- Wei Jian Gan (weijiangan)
|
||||||
|
- adamcstephens
|
||||||
|
|
||||||
## Acknowledgements
|
## Acknowledgements
|
||||||
|
|
||||||
|
|
|
@ -31,18 +31,13 @@ fn main() {
|
||||||
std::fs::create_dir(&comp_dir).expect("Unable to create completions dir");
|
std::fs::create_dir(&comp_dir).expect("Unable to create completions dir");
|
||||||
}
|
}
|
||||||
|
|
||||||
generate_to(
|
for shell in [Shell::Bash, Shell::Elvish, Shell::Fish, Shell::Zsh] {
|
||||||
Shell::Bash,
|
generate_to(
|
||||||
&mut KanidmdParser::command(),
|
shell,
|
||||||
"kanidmd",
|
&mut KanidmdParser::command(),
|
||||||
comp_dir.clone(),
|
"kanidmd",
|
||||||
)
|
comp_dir.clone(),
|
||||||
.ok();
|
)
|
||||||
generate_to(
|
.ok();
|
||||||
Shell::Zsh,
|
}
|
||||||
&mut KanidmdParser::command(),
|
|
||||||
"kanidmd",
|
|
||||||
comp_dir,
|
|
||||||
)
|
|
||||||
.ok();
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ fn main() -> Result<(), Error> {
|
||||||
std::fs::create_dir(&comp_dir).expect("Unable to create completions dir");
|
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(
|
generate_to(
|
||||||
shell,
|
shell,
|
||||||
&mut SshAuthorizedOpt::command(),
|
&mut SshAuthorizedOpt::command(),
|
||||||
|
|
|
@ -30,33 +30,21 @@ fn main() {
|
||||||
std::fs::create_dir(&comp_dir).expect("Unable to create completions dir");
|
std::fs::create_dir(&comp_dir).expect("Unable to create completions dir");
|
||||||
}
|
}
|
||||||
|
|
||||||
generate_to(
|
for shell in [Shell::Bash, Shell::Elvish, Shell::Fish, Shell::Zsh] {
|
||||||
Shell::Bash,
|
generate_to(
|
||||||
&mut SshAuthorizedOpt::command(),
|
shell,
|
||||||
"kanidm_ssh_authorizedkeys",
|
&mut SshAuthorizedOpt::command(),
|
||||||
comp_dir.clone(),
|
"kanidm_ssh_authorizedkeys",
|
||||||
)
|
comp_dir.clone(),
|
||||||
.ok();
|
)
|
||||||
generate_to(
|
.ok();
|
||||||
Shell::Zsh,
|
|
||||||
&mut SshAuthorizedOpt::command(),
|
|
||||||
"kanidm_ssh_authorizedkeys",
|
|
||||||
comp_dir.clone(),
|
|
||||||
)
|
|
||||||
.ok();
|
|
||||||
|
|
||||||
generate_to(
|
generate_to(
|
||||||
Shell::Zsh,
|
shell,
|
||||||
&mut KanidmUnixParser::command(),
|
&mut KanidmUnixParser::command(),
|
||||||
"kanidm_unix",
|
"kanidm_unix",
|
||||||
comp_dir.clone(),
|
comp_dir.clone(),
|
||||||
)
|
)
|
||||||
.ok();
|
.ok();
|
||||||
generate_to(
|
}
|
||||||
Shell::Bash,
|
|
||||||
&mut KanidmUnixParser::command(),
|
|
||||||
"kanidm_unix",
|
|
||||||
comp_dir,
|
|
||||||
)
|
|
||||||
.ok();
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue