Skip to content

Commit

Permalink
Merge pull request #50 from nevdelap/smallfix
Browse files Browse the repository at this point in the history
Small change to NED_DEFAULTS doco.
  • Loading branch information
nevdelap authored Jul 30, 2018
2 parents 9f6c91e + 950fe6e commit 7f4e0d8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Environment:
interpreted by a shell, so quotes are not required.
for example...
NED_DEFAULTS="-u -c --exclude *.bk --exclude-dir .git"
NED_DEFAULTS="-u -R --exclude *.bk --exclude-dir .git"
Exit codes:
0 matches found/replaced
1 no matches
Expand Down
4 changes: 2 additions & 2 deletions src/options_with_defaults.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ impl OptionsWithDefaults {
arg_matches: opts.parse(args)?,
default_matches: opts.parse(if let Ok(mut default_args) = env::var("NED_DEFAULTS") {
// This replace of ASCII RS character (what the?) is special - it is for
// if when using fish shell someone has done "set NED_DEFAULTS -u -c" rather
// than this "set NED_DEFAULTS '-u -c'" they don't get a cryptic complaint.
// if when using fish shell someone has done "set NED_DEFAULTS -u -R" rather
// than this "set NED_DEFAULTS '-u -R'" they don't get a cryptic complaint.
default_args = default_args.replace("\u{1e}", " ");
default_args
.split_whitespace()
Expand Down
2 changes: 1 addition & 1 deletion src/opts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ static POST_DESCRIPTION: &'static str = "Environment:
interpreted by a shell, so quotes are not required.
for example...
NED_DEFAULTS=\"-u -c --exclude *.bk --exclude-dir .git\"
NED_DEFAULTS=\"-u -R --exclude *.bk --exclude-dir .git\"
Exit codes:
0 matches found/replaced
1 no matches
Expand Down

0 comments on commit 7f4e0d8

Please sign in to comment.