ogham / exa

A modern replacement for ‘ls’.
https://the.exa.website/
MIT License
23.68k stars 659 forks source link

Quote file names containing spaces and/or single quotes #1165

Closed DenebTM closed 11 months ago

DenebTM commented 1 year ago

If a file name contains spaces, it will be wrapped in single quotes ('). If a file name contains literal single quotes, it will instead be wrapped in double quotes ("). This somewhat mimicks the default behaviour of modern-day GNU ls.

This resolves #216 and contributes to #211. It also cleans up the code in the non-printable characters loop a bit.

I personally believe quotes should be the default, but a command-line switch (--no-quotes) exists for those who prefer not having them. This also provides a framework for supporting different quoting styles in the future.

DenebTM commented 1 year ago

Changed to draft because I've realised that this messes with multi-column display in its current state.

DenebTM commented 1 year ago

After some more testing, I've realised that the grid view is currently broken on main.

Reopening as the problem lies somewhere else, not with this PR.

See recent comments on issues #885, as well as #990 and #1198.

DenebTM commented 11 months ago

closing this as the changes have been merged into the maintained fork, eza with #318