]> git.ipfire.org Git - thirdparty/coreutils.git/commit
expand,unexpand: add support for incremental tab stops
authorJacob Keller <jacob.e.keller@intel.com>
Tue, 28 Mar 2017 22:49:50 +0000 (15:49 -0700)
committerPádraig Brady <P@draigBrady.com>
Sun, 2 Apr 2017 23:35:08 +0000 (16:35 -0700)
commit9daef34543cc3267ec8e2cc22488bf202448ed84
treee0cb2828dc5477fe61f9edf6db41c36edd350664
parentc7bcea1b78a581e85247d51980db22b7a3858f58
expand,unexpand: add support for incremental tab stops

Support --tabs="1,+8" which is equivalent to --tabs="1,9,17,..."
useful for viewing unified diff output with its 1 character
gutter for example.

* doc/coreutils.texi ({expand,unexpand} invocation): Document,
using diff processing as the example.
* src/expand-common.c (set_increment_size): Update the new
increment_size global.
(parse_tab_stops): Handle the new '+' prefix.
(finalize_tab_stops): Verify both '+' and '/' prefixes
are not used together.
* tests/misc/expand.pl: Add test cases.
* NEWS: Mention the new feature.
NEWS
doc/coreutils.texi
src/expand-common.c
tests/misc/expand.pl