Skip to content

Commit

Permalink
Make all options required
Browse files Browse the repository at this point in the history
  • Loading branch information
jennydaman committed Mar 11, 2022
1 parent 2147d83 commit 06878ea
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bulkrename"
version = "0.1.0"
version = "0.1.1"
edition = "2021"

readme = "README.md"
Expand Down
14 changes: 7 additions & 7 deletions chris_plugin_info.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,34 @@
{
"name": "filter",
"type": "str",
"optional": true,
"optional": false,
"flag": "--filter",
"short_flag": "-f",
"action": "store",
"help": "Input path filter. Paths which do not match this regex are excluded.",
"default": ".*",
"default": null,
"ui_exposed": true
},
{
"name": "expression",
"type": "str",
"optional": true,
"optional": false,
"flag": "--expression",
"short_flag": "-e",
"action": "store",
"help": "Regular expression to match paths. See https://docs.rs/regex/1.5.5/regex/#syntax",
"default": "(.*)",
"default": null,
"ui_exposed": true
},
{
"name": "replacement",
"type": "str",
"optional": true,
"optional": false,
"flag": "--replace",
"short_flag": "-r",
"action": "store",
"help": "Replacement string with capture groups. See https://docs.rs/regex/1.5.5/regex/#grouping-and-flags",
"default": "\\1",
"default": null,
"ui_exposed": true
}
],
Expand All @@ -42,7 +42,7 @@
"description": "A ChRIS plugin to rename paths using regex",
"documentation": "https://github.com/FNNDSC/pl-bulk-rename",
"license": "MIT",
"version": "0.1.0",
"version": "0.1.1",
"selfpath": "/usr/local/bin",
"selfexec": "bulkrename",
"execshell": "/docker-entrypoint.sh",
Expand Down
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ disable_help_subcommand = true
)]
struct Cli {
/// Input path filter. Paths which do not match this regex are excluded.
#[clap(short, long, default_value = ".*")]
#[clap(short, long)]
filter: String,

/// Regular expression to match paths
#[clap(short, long, default_value = "(.*)")]
#[clap(short, long)]
expression: String,

/// Replacement string with capture groups
#[clap(short, long, default_value = "$0")]
#[clap(short, long)]
replace: String,

/// Silence output
Expand Down

0 comments on commit 06878ea

Please sign in to comment.