Quick Documentation

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

Variables

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
Documentation of a Bash variable
Documentation of a Bash variable

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

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.

Documentation of a function
Documentation of a function

Commands

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.

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

tldr Pages

Documentation from the tldr pages project
Documentation from the tldr pages project

BashSupport Pro bundles a snapshot of tldr pages to provide quick documentation for unknown commands. Content for the supported languages of BashSupport Pro is available.

By default, content from man and info are preferred over tldr pages. If you would like to prefer tldr pages, then you change setting “Prefer tldr for documentation of commands” at Settings… → Languages & Frameworks → BashSupport Pro.

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