NAME
ansiexpand, ansiunexpand - ANSI sequences aware tab expand/unexpand command
SYNOPSIS
ansiexpand [ option ] file ...
ansiunexpand [ option ] file ...
-u --unexpand convert spaces to tabs
-t# --tabstop=# tab stop width
--tabhead=char tab head character
--tabspace=char tab space character
--tabstyle=style tab style
--ambiguous=wide|narrow width of Unicode ambiguous character
VERSION
Version 1.04
DESCRIPTION
ansiexpand is an expand(1) compatible command utilizing Text::ANSI::Tabs module, which enables to handle ANSI terminal sequences and Unicode wide characters. Not only expanding tabs to spaces, it can visualize them in various styles.
This is a command line interface for Text::ANSI::Tabs module, which uses Text::ANSI::Fold module as a backend. Consult them for implementation detail.
OPTIONS
- --unexpand, -u
-
Behave as unexpand command.
- --tabstop=#, -t#
-
Set tab stop width. Unlike expand(1), takes only single value.
- --tabhead=char
- --tabspace=char
-
Set tab head and following space character. If longer than single character, it is considered as a Unicode name.
- --tabstyle, --ts
- --tabstyle=style, --ts=...
- --tabstyle=head-style,space-style --ts=...
-
Set the style how tab is expanded. Select
symbol
orshade
for example. If two style names are combined, likesquat-arrow,middle-dot
, usesquat-arrow
for tabhead andmiddle-dot
for tabspace.Show available style list if called without parameter. Styles are defined in Text::ANSI::Fold library.
- --ambiguous=
wide
|narrow
-
Set the width of Unicode ambiguous characters. Default is
narrow
.
INCOMPATIBILITY
There is no -a
option for ansiunexpand
and it always convert all spaces not only leading ones. Use normal unexpand(1) to convert just leading spaces.
ansiexpand -u
or ansiunexpand
convert all spaces whenever possible including single space even if it does not reduce total data length.
FILES
- ~/.ansiunexpandrc
- ~/.ansiexpandrc
-
Start-up file. See Getopt::EX::Module for format.
INSTALL
CPANMINUS
$ cpanm App::ansiexpand
SEE ALSO
App::ansiexpand, https://github.com/tecolicom/App-ansiexpand
AUTHOR
Kazumasa Utashiro
LICENSE
Copyright 2021-2023 Kazumasa Utashiro
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.