Documentation tweak for TYPE

May 30, 2008
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.
 
May 20, 2008
3,515
4
Elkridge, MD, USA
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
 
May 30, 2008
120
1
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.
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,469
88
Albuquerque, NM
prospero.unm.edu
May 20, 2008
3,515
4
Elkridge, MD, USA
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
Thread starter Title Forum Replies Date
vefatica Documentation Documentation of popup location and size Support 4
H Documentation @getdir documentation Support 0
G Documentation on TCMD.INI Support 9
D error in help documentation? Support 0
S PDF Documentation Availability Support 2
S How to? Upgrade Question: What supporting documentation is required at time of purchase? Support 2
M Documentation Q.Search doesn't support selection? Support 1
Joe Caverly Printing TPIPE documentation Support 3
dcantor Documentation Documentation error in UNSET Support 0
cgunhouse Documentation Foldmonitor vs Documentation Support 9
C VIEW PRINT - Documentation corrected - Font size Support 8
Dan Glynhampton Documentation v16 Documentation Support 0
Dan Glynhampton Documentation v16 Documentation comments Support 4
Dan Glynhampton Documentation Some v16 documentation comments Support 0
H Possible V16 documentation error? Support 2
dcantor Documentation TPIPE documentation Support 3
A minor documentation fix - command line editing Support 0
A del /w [minor documentation fix] Support 0
A Minor documentation fix ["-" on command line] Support 3
M How to? %_CMDLine not working the way I thought the documentation says it does... Support 3
M How to? "PDir" not working the way the I _thought _ the documentation said it does… Support 8
T @ping: response code, data size and documentation incorrect Support 2
M "Reawakening" of an old issue with _complete_ documentation... Support 39
JohnQSmith Documentation and examples.btm Support 2
tinjaw [Bug: Documentation] FOR Support 0
vefatica @REGEX: behavior vs. documentation Support 2
Roedy date range documentation error Support 2
dcantor Documentation correction Support 0
millardjk @files and documentation Support 1
S TCC V9 startup option documentation Support 3
dcantor Documentation error Support 0
Joe Caverly Using TYPE with non-English text Support 22
vefatica TYPE behaving randomly Support 10
vefatica Garbage from TYPE Support 2
vefatica TYPE resets console tab settings Support 14
Joe Caverly Get a variable type Support 2
Joe Caverly v24 TYPE Re-direction Support 4
vefatica TYPE goes crazy with no-BOM Unicode file Support 7
J Piping ANSI control sequences through 'type' Support 4
nickles How to? Follow a JUNCTION type directory link Support 9
S International characters - TYPE vs %@LINE function Support 5
thedave WAD Unable to type various characters using Windows 8's onscreen keyboard Support 7
vefatica Fixed TYPE http://... incomplete data Support 40
Phileosophos Documentation TPIPE /string type code confusion Support 4
S WAD %_do_errors does not report errors when loop control variable type is not directory entry Support 1
vefatica TYPE beeping? Support 12
Charles Dye TYPE /P behaves strangely with piped/redirected input Support 0
vefatica LIST and TYPE show UTF8 BOM Support 4
vefatica TYPE, Unicode, installer Support 10
Charles Dye Fixed TYPE /X reports FF for all values >= 80h Support 6

Similar threads