summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCanop <cano.petrole@gmail.com>2024-07-04 22:00:22 +0200
committerCanop <cano.petrole@gmail.com>2024-07-04 22:00:22 +0200
commit6db6167252b73c31179d8c37bd2edafc61230741 (patch)
tree90e9e53b45cd428ea1064854aea59987ccbaab5e
parent37dc621ee9eb8021b7ffd12dc49f0b5784f2a369 (diff)
parent3a38bf890358c9ae96b58c8ff62073aaff50c09c (diff)
Merge remote-tracking branch 'origin/main'
-rw-r--r--features.md5
-rw-r--r--src/shell_install/nushell.rs6
2 files changed, 10 insertions, 1 deletions
diff --git a/features.md b/features.md
index f2b0e1d..a9cbfc6 100644
--- a/features.md
+++ b/features.md
@@ -2,6 +2,7 @@
This page defines the optional features which may be applied on compilation:
* clipboard
+* trash
* kitty-csi-check
Feature gating is usually temporary: they may be removed when a technical problem is solved, when a feature becomes "mainstream", or when it's dropped because no user mentioned using it.
@@ -15,6 +16,10 @@ Limits:
- the feature doesn't compile right now on some platforms (for example Raspberry)
- on some platforms the content leaves the clipboard when you quit broot (so you must paste while broot is still running)
+## The "trash" feature
+
+This feature enables commands for managing the system Trash. They are `:open_trash`, `:delete_trashed_file`, `:restore_trashed_file`, `:purge_trash`.
+
## The "kitty-csi-check" feature
The Kitty graphics protocol allows displaying images in high resolution in broot.
diff --git a/src/shell_install/nushell.rs b/src/shell_install/nushell.rs
index 9812315..13bce65 100644
--- a/src/shell_install/nushell.rs
+++ b/src/shell_install/nushell.rs
@@ -110,7 +110,11 @@ export def --env br [
if $whale_spotting { $args = ($args | append $'--whale-spotting') }
if $write_default_conf != null { $args = ($args | append $'--write-default-conf=($write_default_conf)') }
- let cmd_file = ([ $nu.temp-path, $"broot-(random chars).tmp" ] | path join)
+ let cmd_file = (
+ if ($env.XDG_RUNTIME_DIR? | is-not-empty) { $env.XDG_RUNTIME_DIR } else { $nu.temp-path }
+ | path join $"broot-(random chars).tmp"
+ )
+
touch $cmd_file
if ($file == null) {
^broot --outcmd $cmd_file ...$args