shtags

Section: User Commands (1)
Updated: local Utilities
Index Return to Main Contents
 

NAME

shtags - Create tags for shell scripts  

SYNOPSIS

shtags [-mvw] [-t <file>] [-s <shell>] <files>  

DESCRIPTION

shtags creates a vi(1) tags file for shell scripts - which essentially turns your code into a hypertext document. shtags attempts to create tags for all function and variable definitions, although this is a little difficult, because in most shell languages, variables don't need to be explicitly defined, and as such there is often no distinct "variable definition". If this is the case, shtags simply creates a tag for the first instance of a variable which is being set in a simple way, ie: set x = 5.  

OPTIONS

-t <file>
Name of tags file to create. (default is 'tags')
-s <shell>
The name of the shell used by the script(s). By default, shtags tries to work out which is the appropriate shell for each file individually by looking at the first line of each file. This wont work however, if the script starts as a bourne shell script and tries to be clever about starting the shell it really wants. Currently supported shells are:
sh
Bourne Shell
perl
Perl (versions 4 and 5)
ksh
Korn Shell
tclsh
The TCL shell
wish
The TK Windowing shell (same as tclsh)

-v
Include variable definitions (variables mentioned at the start of a line)
-V
Print version information.
-w
Suppress "duplicate tag" warning messages.
-x
Explicitly create a new tags file. Normally new tags are merged with the old tags file.

shtags scans the specified files for subroutines and possibly variable definitions, and creates a vi style tags file.  

FILES

tags
A tags file contains a sorted list of tags, one tag per line. The format is the same as that used by vi(1)
 

AUTHOR

Stephen Riehm
sr@pc-plus.de  

SEE ALSO

ctags(1), etags(1), perl(1), tclsh(1), wish(1), sh(1), ksh(1).


 

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
FILES
AUTHOR
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 13:57:36 GMT, April 15, 2025