mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-07 18:21:16 -03:00
Run fish_indent on all our fish scripts
It's now good enough to do so.
We don't allow grid-alignment:
```fish
complete -c foo -s b -l barnanana -a '(something)'
complete -c foo -s z -a '(something)'
```
becomes
```fish
complete -c foo -s b -l barnanana -a '(something)'
complete -c foo -s z -a '(something)'
```
It's just more trouble than it is worth.
The one part I'd change:
We align and/or'd parts of an if-condition with the in-block code:
```fish
if true
and false
dosomething
end
```
becomes
```fish
if true
and false
dosomething
end
```
but it's not used terribly much and if we ever fix it we can just
reindent.
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
# RUN: %fish %s
|
||||
function complete_test_alpha1; echo $argv; end
|
||||
function complete_test_alpha1
|
||||
echo $argv
|
||||
end
|
||||
|
||||
complete -c complete_test_alpha1 --no-files -a '(commandline)'
|
||||
complete -c complete_test_alpha2 --no-files -w 'complete_test_alpha1 extra1'
|
||||
@@ -29,7 +31,9 @@ complete -C'myalias2 call3 '
|
||||
|
||||
# Ensure that commands can't wrap themselves - if this did,
|
||||
# the completion would be executed a bunch of times.
|
||||
function t --wraps t; echo t; end
|
||||
function t --wraps t
|
||||
echo t
|
||||
end
|
||||
complete -c t -fa '(t)'
|
||||
complete -C't '
|
||||
# CHECK: t
|
||||
@@ -155,8 +159,8 @@ complete -C'echo > /' | string length -q && echo ok
|
||||
# CHECK: ok
|
||||
|
||||
function some_function
|
||||
echo line1
|
||||
echo line2
|
||||
echo line1
|
||||
echo line2
|
||||
end
|
||||
complete -c complete_test_function_desc -xa '(complete -Csome_function)'
|
||||
complete -C'complete_test_function_desc ' | count
|
||||
|
||||
Reference in New Issue
Block a user