You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,11 +17,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
17
17
- The `cmd-history-next` and `cmd-history-prev` commands will now select only matching entries if part of the command is typed beforehand (#2161). Consecutive duplicate entries will also be skipped for convenience.
18
18
- The string representation of commands shown when displaying keybindings is simplified (e.g. `cd ~` instead of `cd -- [~]`) (#2165).
19
19
-`yes-no-prompts` now use the same design everywhere (#2212).
20
+
- Logs generated by `-log <path>` now get appended to `<path>` instead of overwriting it (#2215).
20
21
21
22
### Added
22
23
23
24
- A new command `cmd-menu-discard` is added to allow exiting the completion menu with completions discarded (#2146).
24
25
- The `lf_mode` environment variable will now be set to `compmenu` if the completion menu is active (#2146).
26
+
- A `ruler` config file is added as an alternate method for customizing the ruler (#2186). This is intended to eventually replace the existing `rulerfmt`/`statfmt` options and must be enabled using the new `rulerfile` option. **This feature is currently experimental.**
25
27
26
28
### Fixed
27
29
@@ -31,6 +33,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
31
33
- A bug where the `source` command does not show an error message upon failure is now fixed (#2189).
32
34
- The `addcustominfo` command as well as the `cleaner` and `previewer` options now support file completions (#2198) (#2211).
33
35
- A bug where an empty `custom` info property would still take up space is now fixed (#2208).
36
+
- A bug where setting `drawbox` could lead to scrolling outside the view is now fixed (#2210) (#2218).
37
+
- The preview cache is now not cleared when setting `ratios` to its current value (#2218).
The ruler can be configured using a ruler file (refer to the [CONFIGURATION section](https://github.com/gokcehan/lf/blob/master/doc.md#configuration)).
2206
+
The contents of the ruler file should be a Go template which is then rendered to create the actual output (refer to https://pkg.go.dev/text/template for more details on the syntax).
2207
+
This feature is currently experimental and must be enabled via the `rulerfile` option.
2208
+
2209
+
The following data fields are exported:
2210
+
2211
+
.Message string Includes internal messages, errors, and messages generated by the `echo`/`echomsg`/`echoerr` commands
2212
+
.Keys string Keys pressed by the user
2213
+
.Progress []string Progress indicators for copied, moved and deleted files
2214
+
.Copy []string List of files in the clipboard to be copied
2215
+
.Cut []string List of files in the clipboard to be moved
2216
+
.Select []string Selection list
2217
+
.Visual []string Visual selection
2218
+
.Index int Index of the cursor
2219
+
.Total int Number of visible files in the current directory
2220
+
.Hidden int Number of hidden files in the current directory
2221
+
.LinePercentage string Line percentage (analagous to `%p` for the `statusline` option in Vim)
2222
+
.ScrollPercentage string Scroll percentage (analagous to `%P` for the `statusline` option in Vim)
2223
+
.Filter []string Filter currently being applied
2224
+
.Mode string Current mode ("NORMAL" for Normal mode, and "VISUAL" for Visual mode)
2225
+
.Options map[string]string The value of options (e.g. `{{.Options.hidden}}`)
2226
+
.UserOptions map[string]string The value of user-defined options (e.g. `{{.UserOptions.foo}}`)
2227
+
.Stat.Path string Path of the current file
2228
+
.Stat.Name string Name of the current file
2229
+
.Stat.Size uint64 Size of the current file
2230
+
.Stat.Permissions string Permissions of the current file
2231
+
.Stat.ModTime string Last modified time of the current file (formatted based on the `timefmt` option)
2232
+
.Stat.LinkCount string Number of hard links for the current file
2233
+
.Stat.User string User of the current file
2234
+
.Stat.Group string Group of the current file
2235
+
.Stat.Target string Target if the current file is a symbolic link, otherwise a blank string
2236
+
2237
+
The following functions are exported:
2238
+
2239
+
df func() string Get an indicator representing the amount of free disk space available
2240
+
env func(string) string Get the value of an environment variable
2241
+
humanize func(uint64) string Express a file size in a human-readable format
2242
+
join func([]string, string) string Join a string array by a separator
2243
+
lower func(string) string Convert a string to lowercase
2244
+
substr func(string, int, int) string Get a substring based on starting index and length
2245
+
upper func(string) string Convert a string to uppercase
2246
+
2247
+
The special identifier `{{.SPACER}}` can be used to divide the ruler into sections that are spaced evenly from each other.
0 commit comments