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
fnm exec
usage text is wrong
#396
Comments
I'm sorry but how this is wrong? Isn't it just more explicit? The former is auto generated by |
Well, I guess it just not very familiar format for me. Also, I found it quite annoying that fnm tries to consume all arguments, I mean that So techically usage string should be |
That's how every program works - |
My top used programs stops consuming named arguments after positional exec node -p process.version
echo process.version | xargs node -p
nvm exec 12 node -p process.version In all examples above I'm trying to say, that it's more convenient to stop parsing arguments after first positional argument, especially for a program that runs other programs with their own arguments. |
I guess |
None of those are being passed double-dashed options. |
That’s the point. They do not require double dash while fnm requires it |
Because fnm has double-dashed options. |
I think a better example would be That being said, if we can try making this easier and nicer, let's do it. It's a cosmetic change but I will see if I can make it work when I have free time 😃 |
Yep, and I don’t like npm for this behavior. E.g. yarn allows you to write simply |
Let's see if we can use what you suggested. I agree that it would be best. By the way I always put the double dash on yarn and it constantly mentions that I can avoid doing that. The funny thing is that on npm I constantly do the opposite. Don't know why! |
If you don't use the explicit |
Maybe, if we can skip the argument parsing after the first positional argument, we can pull off something like: $ fnm exec --using=12 node -v
^^^^^^^^^^ ^^
fnm argument node argument
$ fnm exec -- node -v # still works Not sure that it is possible, but we can check. This way, we can introduce arguments as much as we want, and when you provide the command name, it's not our problem anyway. Is it still an issue this way? 🤔 |
You can if you declare that everything after first positional argument is never an option for fnm itself or fnm’s subcommand. Yes, introducing this would be a breaking change, but after that there is no problem to add new options. And actually I don’t think that anybody ever really used something like this |
@alexeyten unix conventions mean that there's a universal expectation that non-positional args ( |
Unix convention is that after double dash all args are positional even if they starts with dash. But it doesn’t mean (or require) to accept named arguments anywhere.
Another example would be |
I’m not familiar with watch in posix, but xargs is a good point. |
fnm exec
without options shows following text:The
USAGE
text is wrong.fnm exec --help
shows rightUSAGE
clause.The text was updated successfully, but these errors were encountered: