-
Notifications
You must be signed in to change notification settings - Fork 525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make command line GNU-compatible #1974
Comments
/cc @eiriktsarpalis |
I couldn't agree more with this. It's understandable how it has historically grown to this but eventually we should sit down, do it properly and follow standards/best practices even when it hurts (as @agross has shown here standards have a good reason). Its even worse for FAKE ;) |
While we're at it, I also suggest we have a hard look at the documented strings:
Should read:
|
I already suggested that kind of change for v2 in #1035. On that note, |
@inosik I think the rationale behind |
I believe Argu 3.0 supports the syntax that you describe. |
That's a case where it would be better to make it optional and default nuget. It's even worse from an user point of view in Yarn support multiple sources and determine that from the passed in text already: https://yarnpkg.com/en/docs/cli/add |
I spent some time to work on my zsh completion and GNU-style args for |
yas |
Fixed
|
While trying to implement zsh completion for Paket I found that the way Paket handles command line arguments is a bit off to what zsh regards as "the right way" which in turn makes implementing completion overly complex. I also found that some strings Paket accepts as arguments are (for reasons beyond my understanding) not written as such.
Take for example this line:
What's the command and what are parameters?
add nuget
is the commandgroup
is an argumentTest
is a parameter to thegroup
argumentproject
is an argumentFoo.csproj
is a parameter to thegroup
argument--verbose
is an argument that takes no parameters--force
is an argument that takes no parametersSo how should command line completion distinct between command and arguments (with or without parameters)? The short answer is that it can't. At least, I was not able to make it work with zsh without going great lengths and essentially reimplement the standard GNU-style arguments completion that ships with zsh (a 16KB function).
My suggestion is to align the command line to GNU-style:
Both should be regarded as the same. If the second line won't be parsed by Argu, that's fine with me as well.
I know this results in a breaking change, I suggest this to be planned for v4.
The text was updated successfully, but these errors were encountered: