Version: 5.7.1
clc list
List commands are a group of list operations.
Usage:
bash
clc list [command] [flags]
Commands
- clc list add
- clc list contains
- clc list remove-value
- clc list remove-index
- clc list set
- clc list size
- clc list clear
- clc list destroy
clc list add
Add a value in the given list.
Usage:
bash
clc list add [value] [flags]
Parameters:
| Parameter | Required | Description | Default |
|---|---|---|---|
--name, -n | Optional | Name of the list. | default |
value, | Required | Value to set for the key. | N/A |
--value- | Optional | Data type of the value. One of: string, bool, json, i8, i16, i32, i64, f32, f64 | String |
--index | Optional | Index for the value | N/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:
| Parameter | Required | Description | Default |
|---|---|---|---|
--name, -n | Optional | Name of the list. | default |
value, | Required | Value to set for the key. | N/A |
--value- | Optional | Data type of the value. One of: string, bool, json, i8, i16, i32, i64, f32, f64 | String |
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:
| Parameter | Required | Description | Default |
|---|---|---|---|
--name, -n | Optional | Name of the list. | default |
value, | Required | Value to set for the key. | N/A |
--value- | Optional | Data type of the value. One of: string, bool, json, i8, i16, i32, i64, f32, f64 | String |
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:
| Parameter | Required | Description | Default |
|---|---|---|---|
--name, -n | Optional | Name of the list. | default |
--index | Required | Index for the value | N/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:
| Parameter | Required | Description | Default |
|---|---|---|---|
--name, -n | Optional | Name of the list. | default |
--index | Required | Index for the value | N/A |
value, | Required | Value to set for the key. | N/A |
--value- | Optional | Data type of the value. One of: string, bool, json, i8, i16, i32, i64, f32, f64 | String |
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:
| Parameter | Required | Description | Default |
|---|---|---|---|
--name, -n | Optional | Name of the map. | default |
clc list clear
Removes all entries from the list.
Usage:
bash
clc list clear [flags]
Parameters:
| Parameter | Required | Description | Default |
|---|---|---|---|
--name, -n | Optional | Name of the map. | default |
--yes | Optional | Skip 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:
| Parameter | Required | Description | Default |
|---|---|---|---|
--name, -n | Optional | Name of the map. | default |
--yes | Optional | Skip confirming the destroy operation. | false |