Skip to content

Commit

Permalink
Make --name a global arg
Browse files Browse the repository at this point in the history
Fixes #89
  • Loading branch information
piegamesde committed Feb 26, 2025
1 parent a35c041 commit d04c9bb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ Commands:

Options:
-d, --directory <FOLDER> Base folder for sources.json and the boilerplate default.nix [env: NPINS_DIRECTORY=] [default: npins]
--name <NAME> Add the pin with a custom name. If a pin with that name already exists, it willl be overwritten
--name <NAME> Add the pin with a custom name. If a pin with that name already exists, it will be overwritten
-n, --dry-run Don't actually apply the changes
-h, --help Print help
```
Expand All @@ -227,6 +227,8 @@ Options:
Track a branch instead of a release
-d, --directory <FOLDER>
Base folder for sources.json and the boilerplate default.nix [env: NPINS_DIRECTORY=] [default: npins]
--name <NAME>
Add the pin with a custom name. If a pin with that name already exists, it will be overwritten
--at <tag or rev>
Use a specific commit/release instead of the latest. This may be a tag name, or a git revision when --branch is set
--pre-releases
Expand Down
4 changes: 2 additions & 2 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,8 @@ pub enum AddCommands {
#[derive(Debug, Parser)]
pub struct AddOpts {
/// Add the pin with a custom name.
/// If a pin with that name already exists, it willl be overwritten
#[arg(long)]
/// If a pin with that name already exists, it will be overwritten
#[arg(long, global = true)]
pub name: Option<String>,
/// Don't actually apply the changes
#[arg(short = 'n', long)]
Expand Down

0 comments on commit d04c9bb

Please sign in to comment.