#194 Added trash crate and send files to the trash using a flag

This commit is contained in:
jdvr
2019-10-19 00:41:24 +02:00
parent 94429d781f
commit fc1301c92d
4 changed files with 21 additions and 3 deletions

View File

@ -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(