table of contents
bidiv(1) | Ivrix | bidiv(1) |
NAME¶
bidiv - bidirectional text filterSYNOPSIS¶
bidiv [ -plj ] [ -w width ] [file...]DESCRIPTION¶
bidiv is a filter, or viewer, for birectional text stored in logical-order. It converts such text into visual-order text which can be viewed on terminals that do not handle bidirectionality. The output visual-order text is formatted assuming a fixed number of characters per line (automatically determined or given with the -w parameter).$ bidiv file
prints file on your terminal (assuming it has the appropriate fonts, but
no bidirectionality support), and:
$ bidiv file1 file2 | less
concatenates file1 and file2, and shows the results using the
pager less.
If no input file is given, bidiv reads from the standard input file.
OPTIONS¶
- -p
- Paragraph-based direction (default): When formatting a
bidirectional output line, bidiv needs to be aware of that line's
base direction. A line whose base direction is RTL (right to left) gets
right-justified and its first element appears on the right. Otherwise, the
line is left-justified and its first element appears on the left.
- -l
- Line-based direction: This option choose an alternative
method of choosing each output line's base direction. When this option is
enabled, the base direction of each output line is determined on its own
(again, according to the first character on the line with a strong
direction). This method may give wrong results in the case where a line
starts with a word of the opposite direction. This case is rare, but does
happen under random line-splitting circumstances, or when the text is
defining words of a foreign language.
- -j
- Do not justify: By default, RTL lines are right-justified, i.e., they are padded with spaces on the left when shorter than the required line width (see the -w option). The -j option tells bidiv not to preform this justifications, and leave short lines unpadded.
- -w width
- bidiv formats its output for lines of the given
width. Lines are split when longer than this width, and RTL lines are
right-justfied to fill that width unless the -j option is given.
OPERANDS¶
The following operand is supported:- file
- A path name of an input file. If no file is
specified, the standard input is used.
EXAMPLES¶
- 1.
- bidiv README | less
- 2.
- man something | bidiv | less
- 3.
- set "bidiv" as a filter for your mail program
(mutt, pine, etc.) for viewing mail with the ISO 8859-8-i character set,
and Hebrew UTF-8 mail.
ENVIRONMENT¶
COLUMNS see -w option.EXIT STATUS¶
The following exit values are returned:- 0
- All input files were output successfully.
- >0
- An error occurred.
AUTHOR¶
Written by Nadav Har'El, http://nadav.harel.org.il.SEE ALSO¶
cat(1), fribidi(3)7 Jan 2006 | Bidiv |