mirror of
https://github.com/nix-community/comma.git
synced 2026-01-17 03:38:43 +01:00
add --version
This commit is contained in:
parent
98043ec1e1
commit
0f71cf6906
3 changed files with 12 additions and 4 deletions
9
Cargo.lock
generated
9
Cargo.lock
generated
|
|
@ -35,6 +35,7 @@ dependencies = [
|
|||
"bitflags",
|
||||
"clap_lex",
|
||||
"indexmap",
|
||||
"lazy_static",
|
||||
"strsim",
|
||||
"termcolor",
|
||||
"textwrap",
|
||||
|
|
@ -51,7 +52,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "comma"
|
||||
version = "1.2.1"
|
||||
version = "1.2.3"
|
||||
dependencies = [
|
||||
"clap",
|
||||
]
|
||||
|
|
@ -81,6 +82,12 @@ dependencies = [
|
|||
"hashbrown",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lazy_static"
|
||||
version = "1.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.123"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "comma"
|
||||
description = "runs programs without installing them"
|
||||
version = "1.2.1"
|
||||
version = "1.2.3"
|
||||
edition = "2021"
|
||||
authors = ["Artturin <Artturin@artturin.com>"]
|
||||
license = "MIT"
|
||||
|
|
@ -9,4 +9,4 @@ license = "MIT"
|
|||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "3.1.9", features = ["env"]}
|
||||
clap = { version = "3.1.9", features = ["env", "cargo"]}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ use std::{
|
|||
process::{exit, Command, Stdio},
|
||||
};
|
||||
|
||||
use clap::{arg, Arg};
|
||||
use clap::{arg, Arg, crate_version};
|
||||
|
||||
fn pick(picker: &str, derivations: Vec<&str>) -> String {
|
||||
let mut picker_process = Command::new(&picker)
|
||||
|
|
@ -54,6 +54,7 @@ fn run_command(use_channel: bool, choice: &str, command: &str, trail: Vec<&str>)
|
|||
fn main() {
|
||||
let matches = clap::Command::new("comma")
|
||||
.about("runs programs without installing them")
|
||||
.version(crate_version!())
|
||||
.arg(
|
||||
Arg::new("install")
|
||||
.short('i')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue