A newer version of Hazelcast CLC is available.

View latest

\alias

Alias commands enable you to add and list user defined shortcuts.

In order to persist the aliases you need to add \alias add statements in the $CLC_HOME/shell.clc script. shell.clc script is sourced when CLC starts in the interactive mode.

Alias commands can only be used in the interactive and scripting modes.

Aliases can be used with the @ prefix. For example, an alias named my-alias can be used as @my-alias.

Usage:

\alias [command]

\alias add

Add an alias with the given name and command.

Usage:

-- for command
\alias add {ALIAS-NAME} -- {\\COMMAND}

-- for SQL
\alias add {ALIAS-NAME} -- {SQL}

Parameters:

Parameter Required Description Default

name

Required

Name of the alias.

command

Required

Examples:

  • Adds an alias to list maps in the cluster:

\alias add list-maps -- \\object list map
  • Adds an alias to query SQL:

\alias add first-five-desserts -- select name from desserts order by name limit 5;

\alias remove

Remove an alias with the given name.

Usage:

\alias remove [name]

Parameters:

Parameter Required Description Default

name

Required

Name of the alias.

Example:

\alias remove my-alias

\alias list

List existing aliases.

Usage:

\alias list

Example:

\alias list

Alias Usage

Aliases can be used in interactive and scripting modes with @ prefix. Let’s assume an alias named my-alias already created. it can be used as @my-alias.