tag¶
The tag subcommand manages tags. Tags are labels you attach to commands and variables to
keep them organized. Once created, a tag can be attached to as many commands and variables
as you like, and you can filter your lists by tag to quickly find what you need.
The available subcommands for tag are:
Some of these subcommands also have aliases available. These will be discussed in the subcommands section.
add¶
The add subcommand creates a new tag.
When creating a tag, you only have to provide a name. You will be prompted for the rest of the fields.
This same tag can be added in one line.
Notice that name and description are provided without a flag. They are not optional fields.
If you want to be prompted for every field, use the --interactive (or -i) flag.
get¶
The get subcommand retrieves a tag and displays all of its available fields.
update¶
Aliases
update can also be called as edit.
The update subcommand makes changes to a tag you already have stored.
You can update a specific field by providing the appropriate flag and the new value.
To rename a tag, use the --name flag. The tag will be updated across all commands and
variables that use it.
Multiple fields can be updated at once using the --set flag with key=value pairs. Each pair should be separated
by a comma and no white-space.
Autocomplete
Autocomplete is available for field names when using --set.
Warning
Be sure to wrap your values in quotes if they contain spaces.
If you want to update the current value of a field without supplying a completely new value,
use the --edit (or -e) flag. You will be prompted for each field, pre-filled with its
current value.
> cb tag update docker --edit
? Enter name: docker
? Enter description: Docker and container-related commands.
If you only want to update a specific field in edit mode, use the --edit-fields (or -ef)
flag to specify which fields to prompt for.
> cb tag update docker --edit --edit-fields description
? Enter description: Docker and container-related commands.
Warning
--edit-fields can only be used in conjunction with the --edit flag.
list¶
Aliases
list can also be called as ls.
The list subcommand displays all tags stored in your database.
By default, only the name and description of each tag are displayed, and the default order
is by name. The default fields and ordering can be adjusted in your settings, or by supplying
additional options to the list subcommand.
To change the order, use the --order flag and specify the field you want to order by.
To change the displayed fields, use the --field flag and specify the fields you want to display.
If you have a large number of tags, use the --limit flag to cap the number of results.
search¶
Aliases
search can also be called as find.
While list shows all of your tags, search lets you filter by the content of any available
field. By default, search looks across all fields.
Using the --in flag, you can limit your search to specific fields.
To control which fields appear in the results, use the --field flag.
As with list, you can limit the number of results using the --limit flag.
delete¶
Aliases
delete can also be called as rm, del, or remove.
The delete subcommand removes a tag from your database. It only requires the name of the
tag you want to remove.
Warning
Deleting a tag removes it from all commands and variables that use it. The commands and variables themselves are not affected.