The 'announce' Command - jmadison222/jamaratus GitHub Wiki
Print the file header of the script that calls this function.
> announce help
Print the file header of the script that calls this function.
This function assumes that the first three lines of a Bash script are
comment lines that briefly describe the script. This function prints
those three lines. The is very useful when you have lots of scripts
and lots going on in them so that as each one is run, the three-line
header is shown on the screen, and in a color that is distinct from
most other screen content.
Examples:
> cat foobar # Assume you have some script with the following content.
######################################################################
# This is the foobar script.
######################################################################
. jamaratus
announce
echo "Hello World!"
# The header will appear in the color for announcements.
> foobar
######################################################################
# This is the foobar script.
######################################################################
Hello World!
Usage: announce <action:<self>> # Where action is:
<self> This command finds the file it's in by itself. [default]
help Help by showing these instructions.