-
-
Notifications
You must be signed in to change notification settings - Fork 660
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
Options that require --long should either imply it or be silently ignored #152
Comments
I agree that it should go ahead and output anyway. I don't think it should imply |
Then one cannot have an alias with the common options they want and only specify Things like |
+1 mainly because what @Mange said about aliases. I'm using aliases to "replace" |
It's not ready for release yet, but in the option-pars-ng branch (the hardest part of development is coming up with the branch name), there's been a lot of work to support this case. Basically, exa kept on running into limits of the default getopts crate: it didn't accept invalid UTF-8, it threw an error on repeated options, and doesn't support flags later in the list overriding ones from earlier, like how ls does it. I looked at the options, decided that the world needed one more, and wrote a custom option parser that works the "right" way. With this in place, exa will start to ignore options that require I wrote some more stuff on it in one of the files if you're interested in the details. |
Nice. I would suggest the usage of https://clap.rs instead of doing something custom, except apparently clap-rs doesn't have any way to allow later arguments to override earlier ones. There's already an issue open about this (clap-rs/clap#976), so I'm going to go comment on that now. |
I updated the repo, but looks the fatal warning is still there:
|
Argh I forgot to change it for the |
Currently, if you try to execute exa with a long view option but without specifying
--long
/-l
, it gives an error:For comparison, here's what happens on macOS with
ls
:That is to say, if
-@
is specified without-l
, it is silently ignored. Rather than error out, this still gives some useful input. That being said, it makes a certain amount of sense to assume that, in the event a user has specified, say,--git
, the user probably wants long output and that it should be automatically turned on.The text was updated successfully, but these errors were encountered: