Skip to content

Commit

Permalink
fix: change mode to perm
Browse files Browse the repository at this point in the history
  • Loading branch information
owallb committed Sep 13, 2024
1 parent 3e141a7 commit 9388a8c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`, `ctime`, `mode`, `user` and `group`.
Currently supported information types are `size`, `time`, `atime`, `ctime`, `perm`, `user` and `group`.
Information is only shown when the pane width is more than twice the width of information.

## infotimefmtnew (string) (default `Jan _2 15:04`)
Expand Down
2 changes: 1 addition & 1 deletion doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,7 @@ 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, ctime, mode, user and group. Information is only shown when the
atime, ctime, perm, user and group. Information is only shown when the
pane width is more than twice the width of information.

infotimefmtnew (string) (default Jan _2 15:04)
Expand Down
8 changes: 4 additions & 4 deletions eval.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,9 @@ func (e *setExpr) eval(app *app, args []string) {
toks := strings.Split(e.val, ":")
for _, s := range toks {
switch s {
case "size", "time", "atime", "ctime", "mode", "user", "group":
case "size", "time", "atime", "ctime", "perm", "user", "group":
default:
app.ui.echoerr("info: should consist of 'size', 'time', 'atime', 'ctime', 'mode', 'user' or 'group' separated with colon")
app.ui.echoerr("info: should consist of 'size', 'time', 'atime', 'ctime', 'perm', 'user' or 'group' separated with colon")
return
}
}
Expand Down Expand Up @@ -482,9 +482,9 @@ func (e *setLocalExpr) eval(app *app, args []string) {
toks := strings.Split(e.val, ":")
for _, s := range toks {
switch s {
case "size", "time", "atime", "ctime", "mode", "user", "group":
case "size", "time", "atime", "ctime", "perm", "user", "group":
default:
app.ui.echoerr("info: should consist of 'size', 'time', 'atime', 'ctime', 'mode', 'user' or 'group' separated with colon")
app.ui.echoerr("info: should consist of 'size', 'time', 'atime', 'ctime', 'perm', 'user' or 'group' separated with colon")
return
}
}
Expand Down
2 changes: 1 addition & 1 deletion lf.1
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,7 @@ Apply filter pattern after each keystroke during filtering.
A list of information that is shown for directory items at the right
side of the pane.
Currently supported information types are \f[C]size\f[R],
\f[C]time\f[R], \f[C]atime\f[R], \f[C]ctime\f[R], \f[C]mode\f[R],
\f[C]time\f[R], \f[C]atime\f[R], \f[C]ctime\f[R], \f[C]perm\f[R],
\f[C]user\f[R] and \f[C]group\f[R].
Information is only shown when the pane width is more than twice the
width of information.
Expand Down
2 changes: 1 addition & 1 deletion ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ func fileInfo(f *file, d *dir, userWidth int, groupWidth int) string {
info = fmt.Sprintf("%s %*s", info, max(len(gOpts.infotimefmtnew), len(gOpts.infotimefmtold)), infotimefmt(f.accessTime))
case "ctime":
info = fmt.Sprintf("%s %*s", info, max(len(gOpts.infotimefmtnew), len(gOpts.infotimefmtold)), infotimefmt(f.changeTime))
case "mode":
case "perm":
info = fmt.Sprintf("%s %s", info, f.FileInfo.Mode().String())
case "user":
info = fmt.Sprintf("%s %-*s", info, userWidth, userName(f.FileInfo))
Expand Down

0 comments on commit 9388a8c

Please sign in to comment.