mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-12-18 20:53:40 +08:00
60 lines
2.6 KiB
Fish
60 lines
2.6 KiB
Fish
|
logmsg "pipestatus variable - builtins only"
|
||
|
|
||
|
false | false | false; echo $pipestatus : $status
|
||
|
true | true | true; echo $pipestatus : $status
|
||
|
false | true | false; echo $pipestatus : $status
|
||
|
true | false | true; echo $pipestatus : $status
|
||
|
|
||
|
logmsg "pipestatus variable - no builtins"
|
||
|
|
||
|
command false | command false | command false; echo $pipestatus : $status
|
||
|
command true | command true | command true; echo $pipestatus : $status
|
||
|
command false | command true | command false; echo $pipestatus : $status
|
||
|
command true | command false | command true; echo $pipestatus : $status
|
||
|
|
||
|
logmsg "pipestatus variable - mixed"
|
||
|
|
||
|
command false | command false | false; echo $pipestatus : $status
|
||
|
command true | true | command true; echo $pipestatus : $status
|
||
|
false | command true | command false; echo $pipestatus : $status
|
||
|
true | false | command true; echo $pipestatus : $status
|
||
|
sh -c 'exit 5' | sh -c 'exit 2'; echo $pipestatus : $status
|
||
|
sh -c 'exit 3' | false | sh -c 'exit 6'; echo $pipestatus : $status
|
||
|
sh -c 'exit 9' | true | sh -c 'exit 3' | false; echo $pipestatus : $status
|
||
|
|
||
|
logmsg "pipestatus variable - non-pipe"
|
||
|
|
||
|
true; echo $pipestatus : $status
|
||
|
false; echo $pipestatus : $status
|
||
|
command true; echo $pipestatus : $status
|
||
|
command false; echo $pipestatus : $status
|
||
|
sh -c 'exit 4'; echo $pipestatus : $status
|
||
|
|
||
|
logmsg "pipestatus variable - negate"
|
||
|
|
||
|
! true; echo $pipestatus : $status
|
||
|
! false; echo $pipestatus : $status
|
||
|
! false | false | false; echo $pipestatus : $status
|
||
|
! true | command true | true; echo $pipestatus : $status
|
||
|
! false | true | command false; echo $pipestatus : $status
|
||
|
! command true | command false | command true; echo $pipestatus : $status
|
||
|
! sh -c 'exit 9' | true | sh -c 'exit 3'; echo $pipestatus : $status
|
||
|
|
||
|
logmsg "pipestatus variable - block"
|
||
|
|
||
|
begin; true; end; echo $pipestatus : $status
|
||
|
begin; false; end; echo $pipestatus : $status
|
||
|
begin; ! true; end; echo $pipestatus : $status
|
||
|
begin; ! false; end; echo $pipestatus : $status
|
||
|
true | begin; true; end; echo $pipestatus : $status
|
||
|
false | begin; false; end; echo $pipestatus : $status
|
||
|
true | begin; ! true; end; echo $pipestatus : $status
|
||
|
false | begin; ! false; end; echo $pipestatus : $status
|
||
|
begin; true | false; end; echo $pipestatus : $status
|
||
|
begin; false | true; end; echo $pipestatus : $status
|
||
|
begin; ! true; end | false ; echo $pipestatus : $status
|
||
|
begin; ! false; end | true; echo $pipestatus : $status
|
||
|
begin; sh -c 'exit 3'; end | begin; sh -c 'exit 5'; end; echo $pipestatus : $status
|
||
|
begin; ! sh -c 'exit 3'; end | begin; sh -c 'exit 5'; end; echo $pipestatus : $status
|
||
|
begin; ! sh -c 'exit 3'; end | begin; ! sh -c 'exit 5'; end; echo $pipestatus : $status
|