aboutsummaryrefslogtreecommitdiffstats
path: root/src/set-fields.c
diff options
context:
space:
mode:
authorCarl Edquist <edquist@cs.wisc.edu>2021-03-26 04:27:54 -0500
committerPádraig Brady <P@draigBrady.com>2021-04-11 14:58:38 +0100
commit751ad58e00a7cacfb511f651837d336253eb672c (patch)
treeb08372b78bfe5c2200bfa37eb39c1b6e13093876 /src/set-fields.c
parentenv: simplify --split-string memory management (diff)
downloadcoreutils-751ad58e00a7cacfb511f651837d336253eb672c.tar.gz
coreutils-751ad58e00a7cacfb511f651837d336253eb672c.zip
ls: add --sort=width option to sort by file name width
This helps identify the outliers for long filenames, and also produces a more compact display of columns when listing a directory with many entries of various widths. * src/ls.c (sort_type, sort_types, sort_width): New sort_width sort type. (sort_args): Add "width" sort arg. (cmp_width, fileinfo_width): New sort function and helper for file name width. (quote_name_width): Add function prototype declaration. (usage): Document --sort=width option. * doc/coreutils.texi: Document --sort=width option. * tests/ls/sort-width-option.sh: New test for --sort=width option. * tests/local.mk: Reference new test. * NEWS: Mention the new feature.
Diffstat (limited to 'src/set-fields.c')
0 files changed, 0 insertions, 0 deletions