mirror of
https://github.com/clap-rs/clap
synced 2024-11-10 14:54:15 +00:00
feat(nu): Make the completion scripts more general
The generated scripts can be used as script, module and overlay. * script `source completion_script.nu` * module `use completion_script.nu *` * overlay `overlay use completion_script.nu`
This commit is contained in:
parent
6eac61154b
commit
45a7c2e37e
9 changed files with 9 additions and 9 deletions
|
@ -42,7 +42,7 @@ impl Generator for Nushell {
|
|||
}
|
||||
|
||||
completions.push_str("}\n\n");
|
||||
completions.push_str("use completions *\n");
|
||||
completions.push_str("export use completions *\n");
|
||||
|
||||
buf.write_all(completions.as_bytes())
|
||||
.expect("Failed to write to generated file")
|
||||
|
|
|
@ -15,4 +15,4 @@ module completions {
|
|||
|
||||
}
|
||||
|
||||
use completions *
|
||||
export use completions *
|
||||
|
|
|
@ -27,4 +27,4 @@ module completions {
|
|||
|
||||
}
|
||||
|
||||
use completions *
|
||||
export use completions *
|
||||
|
|
|
@ -36,4 +36,4 @@ module completions {
|
|||
|
||||
}
|
||||
|
||||
use completions *
|
||||
export use completions *
|
||||
|
|
|
@ -255,4 +255,4 @@ module completions {
|
|||
|
||||
}
|
||||
|
||||
use completions *
|
||||
export use completions *
|
||||
|
|
|
@ -75,4 +75,4 @@ module completions {
|
|||
|
||||
}
|
||||
|
||||
use completions *
|
||||
export use completions *
|
||||
|
|
|
@ -64,4 +64,4 @@ module completions {
|
|||
|
||||
}
|
||||
|
||||
use completions *
|
||||
export use completions *
|
||||
|
|
|
@ -73,4 +73,4 @@ module completions {
|
|||
|
||||
}
|
||||
|
||||
use completions *
|
||||
export use completions *
|
||||
|
|
|
@ -24,4 +24,4 @@ module completions {
|
|||
|
||||
}
|
||||
|
||||
use completions *
|
||||
export use completions *
|
||||
|
|
Loading…
Reference in a new issue