Command and Function Abbreviations

The command line executor supports abbreviation of command names and built-in function names depending on the unique first characters. This works analogously to keyword abbreviation in the command line parser (see Command Line Considerations for general information about abbreviations and other considerations). Abbreviation is only useful if you work in dialog. If the command is specified in a persistent way (e.g. in a script) writing the complete command or function name is recommended, to ensure that the script must not be changed to work with a later version of the program. For example:

Version X supports only one command starting with C (CONFIG). In this case you can use CON as abbreviation. Version X+1 adds a new command CONFUSION. Now CON is ambiguous and you must use at least CONFI for CONFIG or CONFU for CONFUSION to uniquely identify the command.

Abbreviation Mechanism

The abbreviation matching uses a minimum-length algorithm that compares the provided string against all available command and built-in function names. The match succeeds if the abbreviation matches the beginning of exactly one name and meets the configured minimum length requirement.

If the provided abbreviation matches multiple names, the command line executor will report an ambiguity error and reject the abbreviation. In this case, provide additional characters until the abbreviation uniquely identifies a single command or built-in function.

Usage Recommendations

All these capabilities are implemented to simplify the interactive use and to be compatible with several existing command line syntaxes. But in certain cases, the command interpretation could fail if not the complete command or function name is used.

IMPORTANT: It is strongly recommended to use full command and function names in scripts, batch jobs, and automated processes to ensure clarity, maintainability, and compatibility with future versions.

Examples

Interactive session (abbreviations allowed):

   :> FLAM4 HEL              # Abbreviation for HELP
   :> FLAM4 SYN              # Abbreviation for SYNTAX
   :> FLAM4 MAN              # Abbreviation for MANPAGE
   :> FLAM4 VER              # Abbreviation for VERSION
   :> FLAM4 CONF             # Abbreviation for CONFIG
                              # (if CONV command exists)
   :> FLAM4 TRA              # Abbreviation for TRACE

Production scripts (full names required):

   #!/bin/bash
   FLAM4 HELP                # Full function name
   FLAM4 SYNTAX              # Full function name
   FLAM4 VERSION             # Full function name
   FLAM4 CONFIG              # Full function name

In case-sensitive mode, the required characters for unique identification may be indicated in uppercase in the help output.