fish version: fish, version 3.0.2-1620-g055a3321
OS: Ubuntu 18.04
Terminal: terminator
a7913c3 (the fix for #6147) breaks function definitions that look like this:
function _pisces_bind_pair -a mode left right -d "Creates bindings for the given pair: autoclose and skip closing symbol"
Definitions like this are common in packages, that example is taken from laughedelic/pisces, it also breaks oh-my-fish/theme-bobthefish and probably others. It seems like the solution would be to assume the argument names end when another flag is encountered instead of erroring out.
The text was updated successfully, but these errors were encountered:
amiller27
added a commit
to amiller27/fish-shell
that referenced
this issue
Oct 10, 2019
Not quite. The function definition was already broken, in that the options were never applied (instead variables with those names were defined), only fish never complained.
However I agree that this isn't an acceptable way to fail.
We should just pass all free arguments (those not belonging to any option) to --argument-names if it has been given (excluding the first of course, because that's the function name).
Even arguments that are passed before --argument-names or after other options? So in the definition
function foo a --argument-names b --no-scope-shadowing c
the argument names would be a b c? That seems much less intuitive than what I was intending to do in my PR (treat non-options between --argument-names and the next option as the argument names) but if that's what you want I can change the PR.
fish version: fish, version 3.0.2-1620-g055a3321
OS: Ubuntu 18.04
Terminal: terminator
a7913c3 (the fix for #6147) breaks function definitions that look like this:
Definitions like this are common in packages, that example is taken from laughedelic/pisces, it also breaks oh-my-fish/theme-bobthefish and probably others. It seems like the solution would be to assume the argument names end when another flag is encountered instead of erroring out.
The text was updated successfully, but these errors were encountered: