clap/clap_complete_nushell/tests/snapshots/special_commands.nu

68 lines
1.7 KiB
Text
Raw Normal View History

2022-10-31 12:11:01 +00:00
module completions {
def "nu-complete my-app choice" [] {
2022-10-31 12:11:01 +00:00
[ "first" "second" ]
}
# Tests completions
export extern my-app [
2022-11-02 10:40:20 +00:00
file?: string # some input file
--config(-c) # some config file with another line
--conf # some config file with another line
-C # some config file with another line
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-31 12:11:01 +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-31 12:11:01 +00:00
]
# tests other things
export extern "my-app some_cmd" [
2022-11-02 10:40:20 +00:00
--config: string # the other case to test
2022-11-02 03:58:54 +00:00
...path: string
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-31 12:11:01 +00:00
]
export extern "my-app some-cmd-with-hyphens" [
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-31 12:11:01 +00:00
]
export extern "my-app some-hidden-cmd" [
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-31 12:11:01 +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" [
]
# tests other things
export extern "my-app help some_cmd" [
]
export extern "my-app help some-cmd-with-hyphens" [
]
export extern "my-app help some-hidden-cmd" [
]
# Print this message or the help of the given subcommand(s)
export extern "my-app help help" [
]
2022-10-31 12:11:01 +00:00
}
export use completions *