-
-
Notifications
You must be signed in to change notification settings - Fork 445
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
human readable flag (-h) enabled #906
base: master
Are you sure you want to change the base?
Conversation
This re-enables a quick, easy to type command line flag that `ls` users are familiar with. In the event a user has changed the default configuration of `lsd` to use a size setting of something other than `default`, this lets a user use the historically established CLI flag (`-h`) to enable the human readable option without having to type `--size=default` on the command line.
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: sdorr0 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
hi @sdorr0, thanks for the contribution. I have one more question, what is users used |
Hmm. Yeah, the way the code is written now, Never done Rust before. I'm not sure if there's a way to set up Would this be a requirement to merge this change in? |
I may have a solution |
Never mind. I've tried all kinds of approaches and can't seem to get clap to let So, yes, using |
but it does not make sense for many people may set the |
@@ -52,9 +52,9 @@ pub struct Cli { | |||
#[arg(short = 'R', long, conflicts_with = "tree")] | |||
pub recursive: bool, | |||
|
|||
/// For ls compatibility purposes ONLY, currently set by default | |||
/// This will take precedence over any --size=<mode> option |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO this can be described as "alias for --size=default (included for compatibility with ls)" or something along those lines, then configure this argument and --size
to conflict with each other. So instead of choosing precedence when both are used, one must use either one or the other (or none).
This re-enables a quick, easy to type command line flag that
ls
users are familiar with for convenience.In the event a user has changed the default configuration of
lsd
to use a size setting of something other thandefault
, this lets a user use the historically established CLI flag (-h
) to enable the human readable option without having to type--size=default
on the command line.TODO
cargo fmt