Commit Graph
378 Commits
Author SHA1 Message Date
Carlo Teubner fc4b3637bb Miscellaneous tweaks and fixes (#2223)
* Miscellaneous tweaks and fixes

Mostly these were found by running golangci-lint with a bunch of linters
(more than the default set) enabled.

* fmt.Fprint -> fmt.Fprintln where possible

* Remove "nolint:staticcheck" for now
2025-10-28 15:10:32 +11:00
Joe Lim d8a23be926 Add option for preloading file previews (#2206)
* Initial commit

* Add documentation

* Fix nav volatile preview state

* Use `previewer` for both preloading and previewing

* Generate documentation

* Update `CHANGELOG.md`
2025-10-24 13:26:34 +11:00
Joe Lim a7f7e84e81 Handle nav resizes (#2218)
* Handle nav resizes

* Update `CHANGELOG.md`
2025-10-21 21:46:19 +11:00
Joe LimandCatsDeservePets 7b6b6da100 Add ruler file for customizing the ruler (#2186)
* Add ruler file for customizing the ruler

* Update `CHANGELOG.md`

* Show ruler errors instead of logging them

* Allow multiple sections

* Show syntax errors for ruler file

* Add line percentage

* Add lower/upper functions

* Add back truncation

* Use fmt options

---------

Co-authored-by: CatsDeservePets <145048791+CatsDeservePets@users.noreply.github.com>
2025-10-21 20:04:05 +11:00
CatsDeservePets 35c883e438 Fix overscroll related to drawbox (#2210) 2025-10-20 16:52:56 +02:00
CatsDeservePets a949d4a5d1 Unify [y/N] prompts (#2212) 2025-10-19 05:51:56 +02:00
Joe Lim 4dc3d37684 Show error if source command fails (#2189)
* Show error if `source` command fails

* Update `CHANGELOG.md`

* reword
2025-10-03 12:19:25 +10:00
Joe Lim b0932b02c2 Fix message clear bug during shell-pipe command (#2175) 2025-09-20 14:43:36 +10:00
Joe Lim d3816c6d6a Clear message after running cmap commands (#2168) 2025-09-19 20:45:11 +10:00
Joe Lim 89ff7b0203 Implement smarter history navigation (#2161)
* Remove unnecessary space in history file

* Refactor history navigation

* Implement smarter history navigation

* Skip duplicate commands in history navigation

* Return to Normal mode if it started from there

* Reset history state when changing prompt

* Update documentation
2025-09-19 19:44:43 +10:00
CatsDeservePets 5aeb9a490b Add cmd-menu-discard command (#2146)
* [WIP] Add `cmd-menu-discard` command

* Add `compmenu` to $lf_mode

* Add `cmd-menu-discard` command

* Update documentation
2025-09-19 14:58:02 +10:00
CatsDeservePets f050abc57c Fix: UI glitch with completion menu #2139 (#2140) 2025-09-10 12:28:33 +10:00
Joe Lim 7297e4f522 Add options for customizing the appearance of the menu (#2123)
* Refactor for loop

* Save menu selection

* Add options to customize menu style

* Add documentation
2025-08-27 19:49:07 +10:00
Joe Lim 4fe8f5a858 Add option to specify binary or decimal sizes (#2118)
* Add option to specify binary or decimal sizes

* Fix test case error message

* Add documentation

* Fix typo
2025-08-26 22:32:33 +10:00
Joe Lim 8150586bc2 Clear error messages after a command runs successfully (#2117)
* Draw stat info on demand

* Remove loadfileinfo function

* Fix clearmsg bug when opening directories

* Move visual code
2025-08-26 17:48:15 +10:00
Joe Lim e60c055be3 Remove experimental locale feature (#2111) 2025-08-26 01:41:01 +10:00
Joe Lim 06955cbacc Remove dircache option (#2110) 2025-08-25 23:06:30 +10:00
Joe Lim 13da770af6 Implement builtin support for sixel images, allow combining with text (#2109)
* Add function for reading lines in file

* Implement sixel drawing

* Remove sixel option

* Fix linting error
2025-08-25 22:19:14 +10:00
Joe Lim aba73884e3 Remove deprecated globfilter/globsearch options (#2108) 2025-08-25 15:14:28 +10:00
Joe Lim edc5d977cd Replace save buffer with clipboard struct (#2082) 2025-08-07 19:27:17 +10:00
Joe Lim 42b36fd52c Improvements for command line completion (#2071)
- Refactor of the completion module, primarily to have the `match...` functions return the result for each possible match, so that they can be displayed when the user cycles through the completions using `cmd-menu-complete`/`cmd-menu-complete-back`
- Add support for completing list options (e.g. `set info user:group:size:time`)
- Provide different implementations for escaping/unescaping for `lfrc` command syntax, Unix and Windows. It is a bit hacky, but for now I want to keep `lf` as shell-agnostic as possible which means minimizing the logic based on `gOpts.shell`
- Fix alignment bug in the completion menu when displaying filenames with fullwidth characters
2025-08-07 15:14:25 +10:00
Joe Lim 9183e81f7f Reorder commands to be consistent with documentation (#2075) 2025-08-04 19:31:35 +10:00
Joe Lim 47b3bc5617 Sort options in alphabetical order (#2074)
* Sort options in alphabetical order

* Sort `eval.go` too
2025-08-04 16:26:33 +10:00
Joe Lim 46cc577d4a Cleanup (#2065) 2025-07-26 21:42:52 +10:00
CatsDeservePetsandJoe Lim ab662e6f33 Add filtermethod and searchmethod options (#2058)
* Add `filtermethod` and `searchmethod` options

* Rename `re` to `regex`

* Remove `globfilter` and `globsearch` options

* Add completions for `filtermethod` and `searchmethod`

* Update documentation

* Remove unnecessary if statement

* Fix unrelated typo

* Put options in alphabetical order

* Fix typo in documentation

* Rename variable for consistency

---------

Co-authored-by: Joe Lim <50560759+joelim-work@users.noreply.github.com>
2025-07-26 21:25:45 +10:00
Joe Lim 5b2d5ad99d Support wrapping while in Visual mode (#2056) 2025-07-20 19:54:30 +10:00
CatsDeservePets c7b59d27ce Capitalize modes in code comments and documentation (#2054)
* Capitalize modes in documentation

* Capitalize modes in code comments
2025-07-20 12:08:24 +10:00
Joe Lim c31b92491f Automatically load dircounts after enabling it (#2049) 2025-07-19 14:35:13 +10:00
CatsDeservePets 87c994b9de Support btime in sortby and info (#2042)
* Add support for `btime` in `sortby` and `info`

* Update documentation

* Minor design improvements
2025-07-19 13:06:34 +10:00
CatsDeservePets f40c626c4d Additions to visual-mode (#2035)
* Add `visual-unselect` command

* Add `fv` environment variable
2025-07-08 08:46:26 +10:00
CatsDeservePets c2049e05c2 Fix setExpr for visualfmt and documentation (#2033)
* Fix documentation for visual commands

* Fix missing `visualfmt`
2025-07-07 10:17:38 +10:00
CatsDeservePets cb8026d627 Add visual-mode (#2021)
- Add functionality for visually selecting files
- Add keymap for Visual mode, and supporting `nmap` and `vmap` commands
- Add mode column for `maps` command, also add `nmaps` and `vmaps` commands
- Add `visualfmt` option for configuring appearance for the visual selection
- Add `%m/%M` placeholders for displaying the mode
- Add marker indicating the number of visually selected files in the ruler
- Add `visual` as an identifier when exporting `lf_mode`
- Remove experimental `invert-below` command
2025-07-05 11:33:45 +10:00
CatsDeservePets e47600e428 Add sorting by custom column (#2019) 2025-06-26 11:12:58 +10:00
Joe Lim c3b184fc2e Apply addcustomfilter for hidden files (#2014) 2025-06-20 20:04:20 +10:00
CatsDeservePetsandJoe Lim 17971fd66e Add addcustominfo command (#2012)
Co-authored-by: Joe Lim <50560759+joelim-work@users.noreply.github.com>
2025-06-20 18:02:09 +10:00
CatsDeservePets ff0c7f1c96 Add on-load command (#2010) 2025-06-20 17:36:57 +10:00
yarikandyarik ce13438ab4 fix "slice bounds out of range" in cmd-delete-word-back (#1976)
Co-authored-by: yarik <dazzywi@github.com>
2025-05-07 10:46:34 +10:00
Joe Lim 6616c9c119 Restrict mode prefixes for cmd-history (#1971) 2025-04-28 13:36:59 +10:00
KuchteqandMariusz Kuchta 7a89808688 Make sixel output flicker free (#1943)
* Make sixel output flicker free

* Address pr comments

* Lock regions based on sixel dimensions

This fixes issues related to clearing the previous sixel data

* name changes and extra error handeling

* Apply force clearing changes and change log messages

* Delete missleading comment

* check pixel dimensions

* correct cell dimensions checking

* Add force clearing on image update

---------

Co-authored-by: Mariusz Kuchta <mariusz@kuchta.dev>
2025-04-28 12:26:27 +10:00
Joe Lim 1cb9e9d14a Add tty-write command (#1961)
This command offers a synchronized way to write to /dev/tty.
2025-04-13 11:14:00 +10:00
Joe Lim ffe4c97560 Change menu contents to be a string (#1954) 2025-04-07 14:23:25 +10:00
Joe Lim 0e66d02746 Use clear for clearing maps (#1923) 2025-02-23 19:56:50 +11:00
David Pedersen 2a3292560d Apply modernization fixes (#1921) 2025-02-23 17:05:20 +11:00
Joe Lim f9813744f7 Add dircounts to setlocal options (#1920)
* Remove plural from setlocal variable names

* Add `dircounts` for `setlocal`

* Update documentation

* Fix failing test
2025-02-19 10:43:15 +11:00
Joe Lim 7595e05957 Add workaround for equivalent paths for watch option (#1895)
* Add workaround for equivalent paths for watch option

* Add comment

* Simplify path watching
2025-01-30 09:53:50 +11:00
Joe Lim 2095efa661 Various fixes for updating dircounts with watch enabled (#1881)
* Fix file size bug when copying files

* Don't remove existing watches

* Bump fsnotify

* Ignore watching `/dev`
2025-01-15 13:06:00 +11:00
Joe Lim 670343a23f Add on-init hook command (#1838) 2024-11-06 12:12:12 +11:00
David Pedersen 0b51987044 Use new slices/cmp standard lib (#1834) 2024-11-05 00:08:28 +11:00
David Pedersen 0f48f36b0f Small optimizations and cleanups (#1830) 2024-11-04 00:25:05 +11:00
陆离 3f63bc980f Add option to sort base on certain locale. (#1818)
* Add support for localized sorting

* Switch go-locale module; Use collate option for natural sorting

* Doc and error message improvement

* Simplify predicated checking of localized sorting.

* Improve error handling of `set locale` command
2024-11-02 00:12:21 +11:00