Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add short options to config location flags #1586

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions docs/reference/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -761,16 +761,22 @@ Use this command to manage the configuration.

##### Options

- `--system`: Specify management scope to system configuration.
- `--global`: Specify management scope to global configuration.
- `--local`: Specify management scope to local configuration.
- `--system (-s)`: Specify management scope to system configuration.
- `--global (-g)`: Specify management scope to global configuration.
- `--local (-l)`: Specify management scope to local configuration.

Checkout the [pixi configuration](./pixi_configuration.md) for more information about the locations.

### `config edit`

Edit the configuration file in the default editor.

```shell
pixi config edit --system
pixi config edit --local
pixi config edit -g
```

### `config list`

List the configuration
Expand All @@ -786,6 +792,8 @@ List the configuration
```shell
pixi config list default-channels
pixi config list --json
pixi config list --system
pixi config list -g
```

### `config prepend`
Expand Down
6 changes: 3 additions & 3 deletions src/cli/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ enum Subcommand {
#[derive(Parser, Debug, Clone)]
struct CommonArgs {
/// Operation on project-local configuration
#[arg(long, conflicts_with_all = &["global", "system"])]
#[arg(long, short, conflicts_with_all = &["global", "system"])]
local: bool,

/// Operation on global configuration
#[arg(long, conflicts_with_all = &["local", "system"])]
#[arg(long, short, conflicts_with_all = &["local", "system"])]
global: bool,

/// Operation on system configuration
#[arg(long, conflicts_with_all = &["local", "global"])]
#[arg(long, short, conflicts_with_all = &["local", "global"])]
system: bool,
}

Expand Down
Loading