AUTOCOMPLETE

Description

Allows to implement autocomplete suggestions in a line at the cursor position.

Usage

cm autocomplete install

(Installs 'cm' command completion in the shell.)

cm autocomplete uninstall

(Uninstalls 'cm' command completion from the shell.)

cm autocomplete --line <shell_line> --position <cursor_position>

(Returns autocomplete suggestions for 'shell_line' to be inserted at 'cursor_position'.)

Options

Option / ArgumentDescription
shell_lineThe line the user has written into the shell when the autocompletion was requested. In Bash, it is at the COMP_LINE environment variable. In PowerShell, it is at the $wordToComplete variable.
cursor_positionThe position of the cursor when the autocompletion was requested. In Bash, it is at the COMP_POINT environment variable. In PowerShell, it is at the $cursorPosition variable.

Help

Remarks

This command is not intended to be used by the final user, but it is documented in case it is needed to extend autocompletion support for the shell of choice.

Examples

cm autocomplete --line "cm show" --position 7

(Shows a list of commands starting with "show". In this case: showcommands, showfindobjects, showacl, showowner, showpermissions, showselector.)