Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Documentation tweak for TYPE

May
120
1
The documentation for TYPE starts:

TYPE [/A:[[-][+]rhsadecijopt] /I"text" /L /P] [@file] file...

However, TYPE actually works with no file parameters, when it reads
from STDIN. This is useful when you have an external command that uses
ANSI colour sequences, and you want to display that colour - you can
pipe into TYPE. For example,

ls --color | TYPE

Just putting [] round the file... part of the parameter list (plus a
note in the text saying "Without a file list, TYPE displays the
contents of STDIN") should be enough.

Paul.
 
p.f.moore wrote:
| The documentation for TYPE starts:
|
| TYPE [/A:[[-][+]rhsadecijopt] /I"text" /L /P] [@file] file...
|
| However, TYPE actually works with no file parameters, when it reads
| from STDIN. This is useful when you have an external command that uses
| ANSI colour sequences, and you want to display that colour - you can
| pipe into TYPE. For example,
|
| ls --color | TYPE
|
| Just putting [] round the file... part of the parameter list (plus a
| note in the text saying "Without a file list, TYPE displays the
| contents of STDIN") should be enough.

Sorry, TYPE does not work from STDIN, except from redirected input, be it
from a pipe, as in your case, or from redirected input, e.g, "TYPE <
file.txt" (which behaves identically to "TYPE file.txt"). This, in fact,
ought to be mentioned in help otpic "type.htm". We really ought to have a
gigabyte help file!

Try TYPE <enter> - you get an error message.
--
Steve
 
On 16/07/2008, Steve Fábián <> wrote:

> Sorry, TYPE does not work from STDIN, except from redirected input
[...]

> Try TYPE <enter> - you get an error message.

I never thought of that - TYPE from non-redirected stdin is pretty
useless. But TYPE from a pipe (to translate ANSI codes) has a definite
use. Actually, now I look, I see that this usage is documented under
"ANSI Support".


> We really ought to have a gigabyte help file!

I see no problem with having a huge quantity of help for a program
with a huge quantity of functionality :-)

Paul.
 
p.f.moore wrote:
| On 16/07/2008, Steve Fábián <> wrote:
| ---Quote---
|| We really ought to have a gigabyte help file!
| ---End Quote---
| I see no problem with having a huge quantity of help for a program
| with a huge quantity of functionality :-)

Documentation costs much more than software development. Such a file could
easily double the price you pay for the product.
--
Steve
 

Similar threads

Back
Top