mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 19:37:45 +02:00
#194 Added trash crate and send files to the trash using a flag
This commit is contained in:
@ -11,6 +11,7 @@ pub struct Remove;
|
||||
pub struct RemoveArgs {
|
||||
pub target: Tagged<PathBuf>,
|
||||
pub recursive: Tagged<bool>,
|
||||
pub trash: Tagged<bool>,
|
||||
}
|
||||
|
||||
impl PerItemCommand for Remove {
|
||||
@ -21,11 +22,12 @@ impl PerItemCommand for Remove {
|
||||
fn signature(&self) -> Signature {
|
||||
Signature::build("rm")
|
||||
.required("path", SyntaxShape::Pattern)
|
||||
.switch("trash")
|
||||
.switch("recursive")
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
"Remove a file, (for removing directory append '--recursive')"
|
||||
"Remove a file. Append '--recursive' to remove directories and '--trash' for seding it to system recycle bin"
|
||||
}
|
||||
|
||||
fn run(
|
||||
|
Reference in New Issue
Block a user