mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-14 22:11:16 -03:00
This makes it so that printing a function definition will only use one --argument-names group, instead of one for argument name. For example, "function foo -a x y; ..." will print with "function foo --argument-names x y" instead of "function foo --argument-names x --argument-names y", which is very bizarre. Moreover, the documentation no longer says that argument-names "Has to be the last option.". This sentence appears to have been introduced in error by pull #10524, since the ability to have options afterwards was deliberately added by pull #6188. Part of #11780
36 lines
590 B
Fish
36 lines
590 B
Fish
#RUN: %fish %s
|
|
|
|
function stuff --argument a b c
|
|
# This is a comment
|
|
echo stuff
|
|
# This is another comment
|
|
end
|
|
|
|
functions stuff
|
|
#CHECK: # Defined in {{.*}}
|
|
#CHECK: function stuff --argument-names a b c
|
|
#CHECK: # This is a comment
|
|
#CHECK: echo stuff
|
|
#CHECK: # This is another comment
|
|
#CHECK: end
|
|
|
|
function commenting
|
|
|
|
# line 2
|
|
|
|
# line 4
|
|
|
|
echo Bye bye says line 6
|
|
end
|
|
|
|
functions commenting
|
|
#CHECK: # Defined in {{.*}}
|
|
#CHECK: function commenting
|
|
#CHECK:
|
|
#CHECK: # line 2
|
|
#CHECK:
|
|
#CHECK: # line 4
|
|
#CHECK:
|
|
#CHECK: echo Bye bye says line 6
|
|
#CHECK: end
|