mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
1e858eae35
This demonstrates that we only write control sequences when interactive.
27 lines
564 B
Fish
27 lines
564 B
Fish
#RUN: %fish %s
|
|
|
|
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
|
|
|
|
commandline --help &>/dev/null
|
|
echo Help $status
|
|
# CHECK: Help 0
|
|
|
|
commandline -pC 0 --input "test | test"
|
|
echo $status
|
|
# CHECK: 0
|