usage

Package: WA2L/WinTools 1.2.09
Section: General Commands (1)
Updated: 29 March 2026
Index Return to Main Contents

 

NAME

usage - print short usage or command/alias cmd

 

SYNOPSIS

WA2LWinTools/lib/shell/usage [ -h | -V | -t ]

usage [ -a ] [ what ]

 

AVAILABILITY

WA2L/edrc

 

DESCRIPTION

print a short usage of WA2L/edrc commands and aliases available which are not common on the operating system.

To print the usage of the commands, all ASCII files in the defined directories and usage[-name].list files are searched for the pattern:

(#  |'  |-- |// |%% |rem) usage: command ...

To list commands in the usage output, add one of the following lines to your commands:

  #   usage: my_command [ options ]      - short command description
  '   usage: my_command [ options ]      - short command description
  --  usage: my_command [ options ]      - short command description
  //  usage: my_command [ options ]      - short command description
  %%  usage: my_command [ options ]      - short command description
  rem usage: my_command [ options ]      - short command description

depending on the file type.

Ensure that the alignment is precisely done as in this example, otherwise the output of usage is not aligned and looks messy.

For binary files or not self developed commands to be listed with usage the convention is to add a usage[-name].list file into a searched directory containing the usage: entries.

Append the [scripts] "tag" to the usage string

  rem usage: my_command [ options ]      - short command description              [scripts]

to indicate that the command is located in the var/scripts/ directory.

 

OPTIONS

-h
usage message. The usage message also prints a template of the searched usage: string that can be added to new commands.

-t
print usage entry template.

-a
show all usage messages.

what
select commands starting with what from the whole usage list output.

 

ENVIRONMENT

%USAGEPATH%
semicolon separated path of directories and/or files where to scan for the usage: pattern and to search for the usage[-name].list files.

The directories and files lib/usage.list, var/scripts/, var/scripts/usage-scripts.list and var/db/shell/usage-dynamic.list are searched by default.

The %USAGEPATH% is automatically dynamically extended by var/scripts/*/bin/ and var/scripts/*/lib/ by the wtshell initialization.
 

 

EXIT STATUS

0
no error.

4
usage printed.

5
program version printed.

 

FILES

usage[-name].list
usage list of 3rd party commands or compiled commands.

etc/usage.cfg
optional configuration file for usage.

var/db/shell/usage-dynamic.list
file dynamically updated by the setusage(3) command commonly used in the etc/wtshell.cfg file to mainly list aliases defined in wtshell.cfg sections.

 

EXAMPLES

-

 

SEE ALSO

wintoolsintro(1), wtshell(1m), revision(4), section(3), setusage(3), usage.cfg(4), usage.list(4)

 

NOTES

-

 

BUGS

-

 

AUTHOR

usage was developed by Christian Walther. Send suggestions and bug reports to wa2l@users.sourceforge.net .

 

COPYRIGHT

Copyright © 2009 Christian Walther

This is free software; see WA2LWinTools/man/COPYING for copying conditions. There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


 

Index

NAME
SYNOPSIS
AVAILABILITY
DESCRIPTION
OPTIONS
ENVIRONMENT
EXIT STATUS
FILES
EXAMPLES
SEE ALSO
NOTES
BUGS
AUTHOR
COPYRIGHT

This document was created by man2html, using the manual pages.
Time: 22:21:38 GMT, March 30, 2026