-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
ls: Improve the access to metadata of the files #5660
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
Conversation
Do not merge. I need to simplify the color_name function |
GNU testsuite comparison:
|
src/uu/ls/src/ls.rs
Outdated
ls_colors: &LsColors, | ||
style_manager: &mut StyleManager, | ||
out: &mut BufWriter<Stdout>, | ||
check_for_deref: bool, |
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.
check_for_deref
seems unnecessary to me because its value is linked to target_symlink
: it's true
if target_symlink
is Some(..)
, and false
, if target_symlink
is None
. And as color_name
is only called twice, it might make sense to split the function into two functions.
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.
wahou, well spotted, bravo :)
…tat-free-color.sh
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
Should fix tests/ls/stat-free-color.sh