Commit Graph

905 Commits

Author SHA1 Message Date
Benjamin Sago
e3e776a1fa Use better icon for TeX files
Fixes GH-777.
2021-04-12 22:23:51 +01:00
Benjamin Sago
dbd11d3804 Add classify char to symlink targets
Fixes GH-589.
2021-04-12 22:02:30 +01:00
Benjamin Sago
550f2d29c2 Add context to all option number parse errors
Fixes GH-839.
2021-04-12 21:42:45 +01:00
Benjamin Sago
31043462af Improve help text for -d flag
Fixes GH-202.
2021-04-11 23:43:36 +01:00
Benjamin Sago
311c9baf65 Explain device IDs with a comment 2021-04-11 23:34:29 +01:00
ariasuni
bd4f144884 Fix deducing git ignored state for files too, not only directories 2021-04-10 00:56:07 +02:00
Benjamin Sago
6403336028
Merge pull request #841 from ariasuni/dont-aggregate-git-ignored-status
Fix --git deducing ignored state in unintuitive way
2021-04-09 23:12:37 +01:00
Benjamin Sago
e86f2b938b
Merge pull request #837 from ariasuni/fix-month-name-not-translated
Fix month name not following locale when date is in current year
2021-04-09 23:11:28 +01:00
ariasuni
8c10feec51 Fix --git deducing ignored state in unintuitive way
It makes sense to consider that a directory has the aggregated status of all the files under it.

The exception is that for the ignored status, it’s more useful and intuitive to consider that it applies to everything under it.

- A directory containing an ignored file is no longer considered ignored
- A file inside an ignored directory is now considered ignored
2021-04-09 21:47:42 +02:00
ariasuni
3a8005c840 Fix month name not following locale when date is in current year 2021-04-09 17:54:18 +02:00
ariasuni
c729e226da Fix EXA_GRID_ROWS not working in some cases 2021-04-09 17:48:00 +02:00
ariasuni
7a4cde75eb Use thousand separators again and fix alignement when it’s not ASCII 2021-04-06 16:23:30 +02:00
Benjamin Sago
8c34b46a22 Version output changes
• Bring what's shown in the version string in line with my other projects (URL, description, git hash and date for release-mode non-final builds only, potential for colours in the future)
• Show +git or -git depending on feature status
• Tests for the above, and for checking that the command-line flag is warned about
2021-04-03 17:41:48 +01:00
Benjamin Sago
701a2e60e5 Add 'exa: ' before all command-line errors 2021-04-01 11:25:50 +01:00
Benjamin Sago
622904d07c Fix integration tests after merged PRs
• The spaces between icons and filenames are now coloured too
• Some icons are different
• File sizes are now more accurate
• New help text, which needed a newline at the end
2021-04-01 10:19:34 +01:00
Benjamin Sago
4a108c1786 Fix a new compile-time warning 2021-04-01 09:39:12 +01:00
Benjamin Sago
c1435411c3
Merge pull request #813 from b05902132/numeric_gid_uid
Add options for -n or --numeric-gid-uid.
2021-04-01 09:18:59 +01:00
b05902132
2f72b3ff3a Use --numeric instead of --numeric-uid-gid. 2021-03-31 21:48:59 +08:00
b05902132
53ccf18746 Add test for parsing '--numeric-uid-gid'. 2021-03-31 21:48:59 +08:00
b05902132
76f20f8b7d Add strictness check for '-n'. 2021-03-31 21:48:59 +08:00
b05902132
46a3e59e66 Some minor fixes
Co-authored-by: Mélanie Chauvel <perso@hack-libre.org>

Also add more spaces to make the descriptions of other options align that of `-n`.
2021-03-31 21:48:34 +08:00
Benjamin Sago
f27fb2ab7a
Merge pull request #822 from ariasuni/fix-exa-rounding
Fix a rounding error in human readable filesizes
2021-03-30 14:50:29 +01:00
Benjamin Sago
96e3f3d8d3
Merge pull request #818 from PatriotRossii/feature/determine_time_zone
Update determine_time_zone according to GNU manual
2021-03-30 14:49:48 +01:00
Benjamin Sago
96e9307b99
Merge pull request #790 from ariasuni/fix-too-many-headers-in-grid-details
Don’t produce extra column sometimes with long grid + header
2021-03-30 14:37:52 +01:00
Benjamin Sago
3c69169993
Merge pull request #784 from ariasuni/fix-icons-not-showing-right-in-konsole
Use same styling for spaces between icon and file name
2021-03-30 00:18:39 +01:00
Benjamin Sago
e6edb888a0
Merge pull request #762 from ariasuni/warm-when-git-feature-is-disabled
Warm when git feature is disabled instead of ignoring flags
2021-03-29 23:51:30 +01:00
Benjamin Sago
005a174e60
Merge pull request #759 from stuartcarnie/sgc/icons
feat: New Icons and CLI argument to suppress icons
2021-03-29 23:09:26 +01:00
ariasuni
74ecf6d311 Fix a rounding error in human readable filesizes 2021-03-27 18:54:00 +01:00
PatriotRossii
4e5e2ce8f0
Replace "replace" with "replacen" 2021-03-25 11:20:11 +05:00
PatriotRossii
5743e6d8e3
Replace strip_prefix with replace 2021-03-24 19:05:38 +05:00
PatriotRossii
57cf0f1b23 Update determine_time_zone according to GNU manual 2021-03-24 17:36:13 +05:00
b05902132
4ea79ee11d Add options for -n or --numeric-gid-uid.
This option is only avaialable in -l.
There's test for rendering, but no test for option parsing.
(I don't understand that section of code.)
2021-03-19 09:49:17 +08:00
Stuart Carnie
c946bab08e
chore: PR feedback 2021-02-28 07:48:00 +11:00
Stuart Carnie
765fcf64c9
Update src/output/icons.rs
Co-authored-by: Mélanie Chauvel <perso@hack-libre.org>
2021-02-28 07:43:42 +11:00
Stuart Carnie
c42e0b3945
feat: New Icons and CLI argument to suppress icons 2021-02-28 07:18:17 +11:00
whonore
2708360fb5 Apply sort order to line and grid outputs. Fix #404 2021-01-14 10:01:27 -05:00
Mélanie Chauvel
13b91cced4
Merge pull request #772 from 0xflotus/patch-2 2021-01-14 14:29:34 +01:00
0xflotus
d11ac5d49b
Recognize SCSS and Stylus as source for CSS files (#770) 2021-01-14 13:54:45 +01:00
ariasuni
0f414cf0b9 Don’t produce extra column sometimes with long grid + header
The number of necessary columns was computed by producing a grid in different sizes and see if all columns were used. However, if there was two files and we tried to fit them in a 3-column grid, it would produces three headers and all three columns would be used; when trying a 4-column grid, the two supplementary headers would fill the third column and the fourth would be empty; so 3 columns would be used.

Now, when the grid fits into the terminal and the number of columns is exactly the number of files to display, it returns immediately instead of trying bigger grids.

Fixes GH-436.
2021-01-12 20:18:19 +01:00
ariasuni
79bac416f6 Use same styling for spaces between icon and file name
This is only visible when selecting both icon and file name, as most terminal emulators then invert background and foreground color.

It also workaround a Konsole bug: https://bugs.kde.org/show_bug.cgi?id=422776
2021-01-03 22:44:16 +01:00
0xflotus
7b15f32da8
feat: add support Typescript and ReasonML projects
Close #771
2020-12-16 00:08:04 +01:00
ariasuni
42bc34f339 Tell if exa was compiled with git support or not when using --help 2020-12-10 19:29:33 +01:00
ariasuni
a740512014 Warm when git feature is disabled instead of ignoring flags
The flags --git and --git-ignore are caught early during options parsing, so no more checking for git feature is done elsewhere.

Since --git-ignore depends on git too since recently, remove it from help when git feature is disabled.

Extended attributes now don’t artificially depends on git feature being enabled.
2020-12-10 18:48:58 +01:00
Benjamin Sago
51be9f4c43 Introduce EXA_ICON_SPACING environment variable
This commit remove the extra space that was added between icons and file names in commit 128fadd, and adds an option to put them back.

Re-fixes GH-619 and fixes GH-541.
2020-10-24 19:41:07 +01:00
Benjamin Sago
976db01b3e Prefer background colour when painting icons
The rationale here is that there's more of a background colour than the foreground colour when painting text, and having a gap of no background colour in between the icon and the file name looks weird.

Fixes GH-561.
2020-10-24 18:29:28 +01:00
Benjamin Sago
67a6cdd46a Make icon styles appropriate for all file types
exa now bases the icon style for a file on its file name and kind in all cases, rather than just on its file name. This means that directories and symlinks have the correctly-coloured icon.

It also only takes the foreground colour into account while styling the icon, to make sure they're not bold or underlined.

Fixes GH-528.
2020-10-24 18:16:38 +01:00
Benjamin Sago
f1e3e7c7ff Move icon generation into file name module
This commit makes adding icons to file names something that the file name renderer does, rather than something that each individual view does. This is now possible thanks to the previous commit a1869f2, which moved the option to do this into the same module. The repeated code has been removed.

It happens to fix a bug where the width of each column was being incorrectly calculated for the grid-details view, making lines slightly too long for the terminal because the icon wasn't being taken into account.
2020-10-24 18:03:36 +01:00
Benjamin Sago
a1869f208e Move common icons option to file style struct
All four of the view mode command-line argument parsers tested for the --icons option. Because it was common, the behaviour has been moved to the struct that handles file styles, meaning it can be parsed in one place.

This is a better place for it, as the icons are to do with the file name, not the view. It also means that the lines view has no options left for it, which is fitting.
2020-10-23 23:57:10 +01:00
Benjamin Sago
fd730e436c Make View command-line args position-dependent
This commit changes the way the View (long mode, lines mode, grid mode, etc) is parsed from the command-line arguments.

Previously, it checked for long and long-grid, then tree, then lines, then grid, in that order, no matter which order the arguments were given in on the command-line. Now, it bases the view on whichever argument comes last in the list.

Unfortunately, the options-parsing code for Views is getting really complicated, but I can't see a way to simplify it while retaining the existing functionality.

It also links the parsing of DirAction to the result of parsing the View, so that you can't use tree mode if your view isn't Details. This is to fix an issue where `exa --tree --oneline` would just emit ".", because the DirAction was treating directories as files, and the argument was ".", and the View made it use lines view. Now, the --tree is ignored, as the view isn't Details.

Fixes GH-407 and GH-583.
2020-10-23 23:04:22 +01:00
Benjamin Sago
bf3d58aa80 a small formatting change 2020-10-23 22:32:16 +01:00