forked from extern/nushell
Fix trash functionality (#3146)
For now the trash doesn't work because the trash-support flag isn't enabled in nu-engine crate, so make it work by adding this flag. Signed-off-by: Tw <wei.tan@intel.com> Co-authored-by: Tw <wei.tan@intel.com>
This commit is contained in:
@ -17,6 +17,7 @@ nu-stream = { version = "0.27.2", path = "../nu-stream" }
|
||||
nu-value-ext = { version = "0.27.2", path = "../nu-value-ext" }
|
||||
nu-ansi-term = { version = "0.27.2", path = "../nu-ansi-term" }
|
||||
|
||||
trash = { version = "1.3.0", optional = true }
|
||||
async-recursion = "0.3.2"
|
||||
async-trait = "0.1.42"
|
||||
bytes = "0.5.6"
|
||||
@ -52,3 +53,4 @@ nu-test-support = { version = "0.27.2", path = "../nu-test-support" }
|
||||
[features]
|
||||
rustyline-support = []
|
||||
dirs = ["dirs-next"]
|
||||
trash-support = ["trash"]
|
||||
|
@ -609,7 +609,7 @@ impl Shell for FilesystemShell {
|
||||
let result;
|
||||
#[cfg(feature = "trash-support")]
|
||||
{
|
||||
let rm_always_trash = config::config(Tag::unknown())?
|
||||
let rm_always_trash = nu_data::config::config(Tag::unknown())?
|
||||
.get("rm_always_trash")
|
||||
.map(|val| val.is_true())
|
||||
.unwrap_or(false);
|
||||
|
Reference in New Issue
Block a user