clap/clap_complete_nushell/tests/snapshots/feature_sample.nu

40 lines
957 B
Text
Raw Normal View History

2022-10-22 15:27:04 +00:00
module completions {
def "nu-complete my-app choice" [] {
2022-10-31 12:11:01 +00:00
[ "first" "second" ]
}
2022-10-22 15:27:04 +00:00
# Tests completions
export extern my-app [
2022-11-02 10:40:20 +00:00
file?: string # some input file
--config(-c) # some config file
--conf # some config file
-C # some config file
choice?: string@"nu-complete my-app choice"
2023-05-23 13:50:43 +00:00
--help(-h) # Print help
2023-01-24 08:26:54 +00:00
--version(-V) # Print version
2022-10-22 15:27:04 +00:00
]
# tests things
export extern "my-app test" [
2022-11-02 10:40:20 +00:00
--case: string # the case to test
2023-05-23 13:50:43 +00:00
--help(-h) # Print help
2023-01-24 08:26:54 +00:00
--version(-V) # Print version
2022-10-22 15:27:04 +00:00
]
2023-05-23 13:50:43 +00:00
# Print this message or the help of the given subcommand(s)
export extern "my-app help" [
]
# tests things
export extern "my-app help test" [
]
# Print this message or the help of the given subcommand(s)
export extern "my-app help help" [
]
2022-10-22 15:27:04 +00:00
}
export use completions *