Skip to content

Commit

Permalink
feat: add version and color to CLI output (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
baszalmstra authored Jun 14, 2023
1 parent 3e10b5a commit 45572ab
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
8 changes: 7 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
[package]
name = "pixi"
version = "0.0.2"
description = "A package management and workflow tool"
edition = "2021"
authors = ["pixi contributors <[email protected]>"]
homepage = "https://github.com/prefix-dev/pixi"
repository = "https://github.com/prefix-dev/pixi"
license = "BSD-3-Clause"
readme = "docs/README.md"

[features]
default = ["native-tls"]
Expand All @@ -10,7 +16,7 @@ rustls-tls = ["reqwest/rustls-tls", "rattler_repodata_gateway/rustls-tls", "ratt

[dependencies]
anyhow = "1.0.70"
clap = { version = "4.2.4", default-features = false, features = ["derive", "usage", "wrap_help", "std"] }
clap = { version = "4.2.4", default-features = false, features = ["derive", "usage", "wrap_help", "std", "color", "error-context"] }
clap_complete = "4.2.1"
console = { version = "0.15.5", features = ["windows-console-colors"] }
dirs = "5.0.1"
Expand Down
5 changes: 4 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ The cli looks as follows:

```bash
➜ pixi -h
A package management and workflow tool

Usage: pixi [COMMAND]

Commands:
Expand All @@ -149,7 +151,8 @@ Commands:
help Print this message or the help of the given subcommand(s)

Options:
-h, --help Print help
-h, --help Print help
-V, --version Print version
```

## Creating a pixi project
Expand Down
1 change: 1 addition & 0 deletions src/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ mod install;
mod run;

#[derive(Parser, Debug)]
#[command(version, about, long_about = None)]
struct Args {
#[command(subcommand)]
command: Option<Command>,
Expand Down

0 comments on commit 45572ab

Please sign in to comment.