2024-04-12 10:19:32 +00:00
|
|
|
#RUN: %fish %s
|
2021-08-14 09:29:22 +00:00
|
|
|
|
|
|
|
commandline --input "echo foo | bar" --is-valid
|
|
|
|
and echo Valid
|
|
|
|
# CHECK: Valid
|
|
|
|
|
|
|
|
commandline --input "echo foo | " --is-valid
|
|
|
|
or echo Invalid $status
|
|
|
|
# CHECK: Invalid 2
|
|
|
|
|
|
|
|
# TODO: This seems a bit awkward?
|
|
|
|
# The empty commandline is an error, not incomplete?
|
|
|
|
commandline --input '' --is-valid
|
|
|
|
or echo Invalid $status
|
|
|
|
# CHECK: Invalid 1
|
|
|
|
|
|
|
|
commandline --input 'echo $$' --is-valid
|
|
|
|
or echo Invalid $status
|
|
|
|
# CHECK: Invalid 1
|
2024-03-04 15:51:57 +00:00
|
|
|
|
2024-03-04 16:07:46 +00:00
|
|
|
commandline --help &>/dev/null
|
|
|
|
echo Help $status
|
|
|
|
# CHECK: Help 0
|
2024-03-10 08:25:48 +00:00
|
|
|
|
|
|
|
commandline -pC 0 --input "test | test"
|
|
|
|
echo $status
|
|
|
|
# CHECK: 0
|