Skip to content

Commit

Permalink
Grouped config commands better (closes #6911) (#6983)
Browse files Browse the repository at this point in the history
* Grouped config commands better

* Tweaked test slightly

* Fix merge conflict(?)

* Remove recently-added test case

* Revert rm.always_trash default

* Untweak rm help messages

* Formatting

* Remove example

* Add deprecation warning

* Remove deprecation timeline

Not sure we want to commit to a specific timeline just yet

Co-authored-by: Reilly Wood <[email protected]>
  • Loading branch information
webbedspace and rgwood committed Nov 19, 2022
1 parent 4b83a2d commit 7479173
Show file tree
Hide file tree
Showing 3 changed files with 524 additions and 156 deletions.
14 changes: 7 additions & 7 deletions crates/nu-command/src/filesystem/rm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@ impl Command for Rm {
}

fn examples(&self) -> Vec<Example> {
let mut examples = vec![
Example {
description: "Delete or move a file to the system trash (depending on 'rm_always_trash' config option)",
example: "rm file.txt",
result: None,
}];
let mut examples = vec![Example {
description:
"Delete or move a file to the trash (depending on 'always_trash' config option)",
example: "rm file.txt",
result: None,
}];
#[cfg(all(
feature = "trash-support",
not(target_os = "android"),
Expand Down Expand Up @@ -164,7 +164,7 @@ fn rm(
if rm_always_trash {
return Err(ShellError::GenericError(
"Cannot execute `rm`; the current configuration specifies \
`rm_always_trash = true`, but the current nu executable was not \
`always_trash = true`, but the current nu executable was not \
built with feature `trash_support` or trash is not supported on \
your platform."
.into(),
Expand Down
Loading

0 comments on commit 7479173

Please sign in to comment.