Project

General

Profile

Actions

$commands » History » Revision 1

Revision 1/2 | Next »
Per Amundsen, 10/14/2022 12:51 PM


Added in 4.3

$commands(N/command)

Returns the Nth built-in and/or alias command.

Parameters

N - If N = 0 number of commands, otherwise the Nth command.
command - Returns $true if the command exists, otherwise $false.

Properties

.builtin - Only list the built-in commands.
.aliases - Only list the aliases found in scripts/plugins.

Example

; Print number of total commands.
//echo -ag $commands(0)

; Print number of built-in commands.
//echo -ag $commands(0).builtin

; Print number of aliases commands found in scripts/plugins.
//echo -ag $commands(0).aliases

; Print the first commands.
//echo -ag $commands(1)

Updated by Per Amundsen about 2 years ago · 1 revisions

Also available in: PDF HTML TXT