Skip to main content
Version: 5.7.1

clc list

List commands are a group of list operations.

Usage:

bash
clc list [command] [flags]

Commands​

clc list add​

Add a value in the given list.

Usage:

bash
clc list add [value] [flags]

Parameters:

ParameterRequiredDescriptionDefault
--name, -nOptionalName of the list.default
value,RequiredValue to set for the key.N/A
--value-type, -vOptionalData type of the value. One of: string, bool, json, i8, i16, i32, i64, f32, f64String
--indexOptionalIndex for the valueN/A

Example:

bash
clc list add --name example-list --value-type i16 10 --index 1

clc list contains​

Check if the value is present in the list.

Usage:

bash
clc list contains [value] [flags]

Parameters:

ParameterRequiredDescriptionDefault
--name, -nOptionalName of the list.default
value,RequiredValue to set for the key.N/A
--value-type, -vOptionalData type of the value. One of: string, bool, json, i8, i16, i32, i64, f32, f64String

Example:

bash
clc list contains --name example-list --value-type i16 10

clc list remove-value​

Remove a value from the list.

Usage:

bash
clc list remove-value [value] [flags]

Parameters:

ParameterRequiredDescriptionDefault
--name, -nOptionalName of the list.default
value,RequiredValue to set for the key.N/A
--value-type, -vOptionalData type of the value. One of: string, bool, json, i8, i16, i32, i64, f32, f64String

Example:

bash
clc list remove-value --name example-list --value-type i16 10

clc list remove-index​

Remove the value at given index from the list.

Usage:

bash
clc list remove-index [index] [flags]

Parameters:

ParameterRequiredDescriptionDefault
--name, -nOptionalName of the list.default
--indexRequiredIndex for the valueN/A

Example:

bash
clc list remove-value --name example-list --value-type i16 10

clc list set​

Set a value at the given index in the list.

Usage:

bash
clc list set [index] [flags]

Parameters:

ParameterRequiredDescriptionDefault
--name, -nOptionalName of the list.default
--indexRequiredIndex for the valueN/A
value,RequiredValue to set for the key.N/A
--value-type, -vOptionalData type of the value. One of: string, bool, json, i8, i16, i32, i64, f32, f64String

Example:

bash
clc list set --name example-list 5 --value-type i16 10

clc list size​

Prints the size of the given the list.

Usage:

bash
clc list size [flags]

Parameters:

ParameterRequiredDescriptionDefault
--name, -nOptionalName of the map.default

clc list clear​

Removes all entries from the list.

Usage:

bash
clc list clear [flags]

Parameters:

ParameterRequiredDescriptionDefault
--name, -nOptionalName of the map.default
--yesOptionalSkip confirming the destroy operation.false

clc list destroy​

Destroy a list

This command will delete the list and the data in it will not be available anymore.

Usage:

bash
clc list destroy [flags]

Parameters:

ParameterRequiredDescriptionDefault
--name, -nOptionalName of the map.default
--yesOptionalSkip confirming the destroy operation.false