Skip to content
This repository was archived by the owner on Oct 4, 2026. It is now read-only.
jrosiekPublic archive
forked from reconquest/shdoc

About

Documentation generator for shell scripts (bash, sh, zsh)

Resources

Stars

0 stars

Watchers

1 watching

Forks

 
 

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

shdoc

Converts comments to function to reference markdown documentation.

Usage

shdoc will match comments in the following form before function definitions:

# @description Multiline description goes here and
# there
#
# @example
#   some:other:func a b c
#   echo 123
#
# @arg $1 string Some arg.
# @arg $@ any Rest of arguments.
#
# @noargs
#
# @exitcode 0  If successfull.
# @exitcode >0 On failure
# @exitcode 5  On some error.
#
# @stdout Path to something.
#
# @see some:other:func()
some:first:func() {

shdoc.awk has no args and expects shell script with comments as described above on the stdin and will markdown output result on the stdout.

Will produce following output:

some:first:func()

Multiline description goes here and there

Example

some:other:func a b c
echo 123

Arguments

  • $1 (string): Some arg.
  • ... (any): Rest of arguments.

Function has no arguments.

Exit codes

  • 0: If successfull.
  • 0: On failure

  • 5: On some error.

Output on stdout

  • Path to something.

See also

  • some:other:func()

Examples

See example documentation on:

About

Documentation generator for shell scripts (bash, sh, zsh)

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages