-
Notifications
You must be signed in to change notification settings - Fork 328
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
feat: add mode, user and group info parameters #1799
Conversation
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.
Thanks for submitting this. I have some minor comments, but overall I think the changes are good and can be merged soon.
doc.md
Outdated
@@ -811,7 +811,7 @@ Apply filter pattern after each keystroke during filtering. | |||
## info ([]string) (default ``) | |||
|
|||
A list of information that is shown for directory items at the right side of the pane. | |||
Currently supported information types are `size`, `time`, `atime`, and `ctime`. | |||
Currently supported information types are `size`, `time`, `atime`, `ctime`, `mode`, `user` and `group`. |
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.
Just wondering, do you think instead of using mode
, something like perm
or permissions
is more intuitive as the name here? Might be a good idea to check what other file managers are using.
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.
Yeah I agree, I will change it to perm.
ui.go
Outdated
@@ -519,6 +542,26 @@ func (win *win) printDir(ui *ui, dir *dir, context *dirContext, dirStyle *dirSty | |||
} | |||
} | |||
|
|||
func getGroupWidth(dir *dir, beg int, end int) int { |
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.
You mixed up the function names:
func getGroupWidth(dir *dir, beg int, end int) int { | |
func getUserWidth(dir *dir, beg int, end int) int { |
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.
Oops! Nice catch.
ui.go
Outdated
return maxw | ||
} | ||
|
||
func getUserWidth(dir *dir, beg int, end int) int { |
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.
Same here:
func getUserWidth(dir *dir, beg int, end int) int { | |
func getGroupWidth(dir *dir, beg int, end int) int { |
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.
Thanks once again for the changes 🎉
Closes #1554