mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-25 23:21:15 -03:00
Run fish_indent on select test scripts
Run fish_indent on test scripts that will be modified in a later commit Not running it on all the files because a quarter of them need fixing, some of which are badly formatted on purpose
This commit is contained in:
committed by
Johannes Altmanninger
parent
9b75b6ee88
commit
7b8f97c1ff
@@ -135,7 +135,8 @@ complete -C'foo -y' | string match -- -y-single-long
|
||||
# CHECK: -zARGZ
|
||||
complete -C'foo -z'
|
||||
|
||||
function foo2; end
|
||||
function foo2
|
||||
end
|
||||
complete -c foo2 -s s -l long -xa "hello-world goodbye-friend"
|
||||
complete -C"foo2 -sfrie"
|
||||
# CHECK: -sgoodbye-friend
|
||||
@@ -483,17 +484,17 @@ complete -c thing -x -F
|
||||
# CHECKERR: complete: invalid option combination, '--exclusive' and '--force-files'
|
||||
# Multiple conditions
|
||||
complete -f -c shot
|
||||
complete -fc shot -n 'test (count (commandline -xpc) -eq 1' -n 'test (commandline -xpc)[-1] = shot' -a 'through'
|
||||
complete -fc shot -n 'test (count (commandline -xpc) -eq 1' -n 'test (commandline -xpc)[-1] = shot' -a through
|
||||
# CHECKERR: complete: -n 'test (count (commandline -xpc) -eq 1': Unexpected end of string, expecting ')'
|
||||
# CHECKERR: test (count (commandline -xpc) -eq 1
|
||||
# CHECKERR: ^
|
||||
complete -fc shot -n 'test (count (commandline -xpc)) -eq 1' -n 'test (commandline -xpc)[-1] = shot' -a 'through'
|
||||
complete -fc shot -n 'test (count (commandline -xpc)) -eq 2' -n 'test (commandline -xpc)[-1] = through' -a 'the'
|
||||
complete -fc shot -n 'test (count (commandline -xpc)) -eq 3' -n 'test (commandline -xpc)[-1] = the' -a 'heart'
|
||||
complete -fc shot -n 'test (count (commandline -xpc)) -eq 4' -n 'test (commandline -xpc)[-1] = heart' -a 'and'
|
||||
complete -fc shot -n 'test (count (commandline -xpc)) -eq 1' -n 'test (commandline -xpc)[-1] = shot' -a through
|
||||
complete -fc shot -n 'test (count (commandline -xpc)) -eq 2' -n 'test (commandline -xpc)[-1] = through' -a the
|
||||
complete -fc shot -n 'test (count (commandline -xpc)) -eq 3' -n 'test (commandline -xpc)[-1] = the' -a heart
|
||||
complete -fc shot -n 'test (count (commandline -xpc)) -eq 4' -n 'test (commandline -xpc)[-1] = heart' -a and
|
||||
complete -fc shot -n 'test (count (commandline -xpc)) -eq 5' -n 'test (commandline -xpc)[-1] = and' -a "you\'re"
|
||||
complete -fc shot -n 'test (count (commandline -xpc)) -eq 6' -n 'test (commandline -xpc)[-1] = "you\'re"' -a 'to'
|
||||
complete -fc shot -n 'test (count (commandline -xpc)) -eq 7' -n 'test (commandline -xpc)[-1] = to' -a 'blame'
|
||||
complete -fc shot -n 'test (count (commandline -xpc)) -eq 6' -n 'test (commandline -xpc)[-1] = "you\'re"' -a to
|
||||
complete -fc shot -n 'test (count (commandline -xpc)) -eq 7' -n 'test (commandline -xpc)[-1] = to' -a blame
|
||||
|
||||
complete -C"shot "
|
||||
# CHECK: through
|
||||
@@ -503,18 +504,17 @@ complete -C"shot through "
|
||||
# See that conditions after a failing one aren't executed.
|
||||
set -g oops 0
|
||||
complete -fc oooops
|
||||
complete -fc oooops -n true -n true -n true -n 'false' -n 'set -g oops 1' -a oops
|
||||
complete -fc oooops -n true -n true -n true -n false -n 'set -g oops 1' -a oops
|
||||
complete -C'oooops '
|
||||
echo $oops
|
||||
# CHECK: 0
|
||||
|
||||
complete -fc oooops -n 'true' -n 'set -g oops 1' -a oops
|
||||
complete -fc oooops -n true -n 'set -g oops 1' -a oops
|
||||
complete -C'oooops '
|
||||
# CHECK: oops
|
||||
echo $oops
|
||||
# CHECK: 1
|
||||
|
||||
|
||||
# See that we load completions only if the command exists in $PATH,
|
||||
# as a workaround for #3117.
|
||||
|
||||
@@ -620,7 +620,7 @@ function __fish_describe_command
|
||||
echo -e "whoami\twho am i"
|
||||
echo -e "which\which is it"
|
||||
end
|
||||
test (count (complete -C"wh" | string match -rv "\tcommand|^while")) -gt 0 && echo "found" || echo "fail"
|
||||
test (count (complete -C"wh" | string match -rv "\tcommand|^while")) -gt 0 && echo found || echo fail
|
||||
# CHECK: found
|
||||
|
||||
set -l commands check search show
|
||||
|
||||
Reference in New Issue
Block a user