Commit Graph
21 Commits
Author SHA1 Message Date
陆离 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
David Pedersen a018257d50 gofumpt lint and misc cleanup (#1682)
* gofumpt lint and misc cleanup

* Reorder fileInfo dircounts code to be clearer
2024-04-20 21:42:28 +02:00
Daniel Zhang 6cabb0e8e4 Support icon color (#1674)
* Support icon color

* Rename variables

* Test for readArrays

* Add doc and examples for icon color
2024-04-20 21:41:37 +02:00
David Pedersen 63815aaa75 Move get file extension logic to util (#1670)
* Move get file extension logic to util

* Update TestGetFileExtension to use fake file

* Add more test cases to TestGetFileExtension
2024-04-07 15:38:32 +02:00
raslop b1a851953b Flexible filename truncation (#1029)
* allow flexible truncation of filenames

As of now, lf truncates always at the end. So for long filenames one can
not see the end (especially not the file ending, like .jpeg or .pdf).

[MidnightCommander](https://github.com/MidnightCommander/mc/) truncates
too long filenames in the middle, so it's possible to see the beginning
and the end of the too long filename.

This commit allows to specify a flexible point for the truncation in
percent of the available space.

* The default value of 100 for the new `truncatepct` option means no
change in lf behaviour.

* More adhering to naming convention.

* Improve error message for invalid `truncatepct` values.

* Remove redundant test cases.

* FIXUP Add dummy empty line to make `go fmt` happy.

* Avoid explicit "cast" to rune array.

* fix(doc.go): remove line with single dot

This was there to avoid that `go fmt` touches the next item with `waitmsg`.
However, removing the spaces before the example list items has the same
effect.
2023-07-03 12:48:51 +03:00
Joe Lim 014d18d3ea Fix runeSliceWidthRange implementation (#1273)
* Fix `runeSliceWidthRange` implementation

* Add empty test case
2023-06-04 16:22:46 +03:00
Joe Lim c3d44123bb Fix typo in misc tests (#1270) 2023-06-04 16:19:39 +03:00
Gokcehan 19aad41b8e cleanup 2022-03-19 19:16:51 +03:00
Gokcehan 3e3a4a6386 fix comments inside quotes in colors/icons files 2022-02-13 23:25:03 +03:00
Gokcehan 85c73978fe fix TestIsRoot on windows 2022-01-22 15:00:55 +03:00
Gokcehan 0482340d5e keep trailing backslash during reverse escape 2019-10-25 20:50:00 +03:00
Gokcehan 7a4d1cc275 escape special characters with backslash 2019-10-25 20:17:49 +03:00
Gokcehan 90e3a22dc8 add a 'B' suffix to files under a thousand bytes
Mentioned in #49.
2017-01-08 19:24:28 +03:00
Gokcehan af113e71ef fill with spaces instead of null chars 2016-12-22 22:58:55 +03:00
Gokcehan a717c31ca1 cleanup 2016-12-18 21:34:41 +03:00
Gokcehan 8ae5f838c7 simplify number extraction using regexp 2016-12-18 00:02:30 +03:00
Gokcehan 225bd5b49c fix number extraction ending with number 2016-12-03 00:38:23 +03:00
Gokcehan 932e644c93 handle escapes in completions 2016-12-03 00:28:25 +03:00
Gokcehan a2cc32c908 implement a send command for remove commands
Mentioned in #36.
2016-11-06 17:06:25 +03:00
Gokcehan 667253906b handle unicode in the ui
Mentioned in #30 and #32.
2016-10-20 23:45:06 +03:00
Gokcehan e45562b282 add misc tests 2016-08-14 22:56:55 +03:00