Quick Documentation

BashSupport Pro supports the quick documentation feature for variables, variable declarations, functions and commands.

Variables

Documentation of a Bash variable
Documentation of a Bash variable

All previous modifications of type and properties are tracked. It stops when there’s no more declaration or until the first unset.

Line comments, which immediately precede the first declaration, are displayed as documentation of that variable. The scope of the variable declaration is displayed in the popup, i.e. local or global

Supported attributes of variables:

  • String, this is the default and not displayed
  • Indexed array, e.g. by declare -a
  • Associative array, e.g. by declare -A
  • Read–only, e.g. by readonly
  • Exported, e.g. by export
  • Integer, e.g. by declare -i
  • Lowercase values on assignment, e.g. by declare -l
  • Uppercase values on assignment, e.g. by declare -u
  • Trace, e.g. by declare -t

Variable Declarations

The documentation of variable declarations is similar to variables. The attributes are first taken from the declaration itself and then merged with any previous declaration of the same variable.

Line comments, which immediately precede the first declaration, are displayed as documentation of that variable.

Builtin Variables

BashSupport Pro comes with its own documentation for the builtin variables, e.g. $HOME.

Documentation of built-in variable $HOME
Documentation of built-in variable $HOME

Functions

Documentation of a function
Documentation of a function

Quick documentation is available on the function name itself or on any invocation of that function.

Line comments, which immediately precede the declaration of the function, are displayed as documentation of that variable.

If the first comment follows the form name(param1,param2), then the parameters are displayed in the rendering.

Commands

Documentation of a Bash built-in command
Documentation of a Bash built-in command

For Bash’s built-in commands, BashSupport Pro displays the content returned by the help command for that particular command.

For other commands, BashSupport Pro displays the info page.

© 2020–2024 Joachim Ansorg
声明
隐私政策
许可条款