Enum vers::cli::Actions

source ·
pub enum Actions {
    Add {
        name: String,
        alias: Option<String>,
        asset_pattern: Option<String>,
        file_filter: Option<String>,
        pre_release: bool,
        show: bool,
    },
    Remove {
        name: String,
        all: bool,
        link_only: bool,
    },
    List {
        installed: bool,
        output: ListOutputType,
    },
    Sync,
    Update {
        name: Option<String>,
    },
    Completions {
        shell: Shell,
    },
    Env {
        name: Option<String>,
        shell: Option<Shell>,
        bare_path: bool,
    },
}

Variants§

§

Add

Fields

§name: String

name of the tool to install to the environment.

To install a specific version use name@version, for example: cli/cli@v2.4.0 version should be a release tag.

§alias: Option<String>

Alias to use instead of the repository name.

This is how you will call the tool on the command line.

§asset_pattern: Option<String>

Pattern used to determine which file from the release to download.

This can be used to override the autodetect mechanism to determine which assets to download.

§file_filter: Option<String>

Filter used to find the executable to link into the environment.

§pre_release: bool

Allow install of pre-release versions of the tool.

When show is provided this includes pre-release versions in the list, When it is not the most recent version is selected, that could be a pre-release or official release depending on release date.

§show: bool

Show available versions

Shows a list of versions available to install, multiple versions can be selected, the first selected will be set up to use in the environment.

Add a tool to the designated environment

§

Remove

Fields

§name: String

name of the tool to remove from the environment

§all: bool

Remove all versions of a tool. Default is to delete the version used by the environment only.

§link_only: bool

Removes the symlink only while leaving the downloaded assets in tact for reuse later

Remove a tool from the designated environment

§

List

Fields

§installed: bool

List all installed versions of tools available to the environment instead of just the currently used one.

§output: ListOutputType

Control how the list is output to the console

List tools available in the designated environment

§

Sync

sync all version information with listed in the env config file.

§

Update

Fields

§name: Option<String>

Which tool to upgrade, when omitted all tools in the environment will be upgraded.

Update tools to the latest version available from GitHub.

§

Completions

Fields

§shell: Shell

the shell to generate completions for.

Generate shell completions for Vers to enable tab completions.

§

Env

Fields

§name: Option<String>

Name of the environment.

§shell: Option<Shell>

Prints out a command to set the environment path in the shells environment.

§bare_path: bool

Output just the bath to the environment rather than a setup string.

show the exports required for setup.

Implementations§

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Assign values from ArgMatches to self.
Assign values from ArgMatches to self.
Append to Command so it can instantiate Self. Read more
Append to Command so it can update self. Read more
Test whether Self can parse a specific subcommand

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more