From f9cfcab291c70b377dd018f2c37038055d79a531 Mon Sep 17 00:00:00 2001 From: Noah Too <41364823+krivahtoo@users.noreply.github.com> Date: Mon, 12 Jul 2021 00:40:50 +0300 Subject: [PATCH] Fix: spaces being trimmed when copying files/paths (#82) --- src/commands/file_ops.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/commands/file_ops.rs b/src/commands/file_ops.rs index e4371d896..ff8d63b88 100644 --- a/src/commands/file_ops.rs +++ b/src/commands/file_ops.rs @@ -96,16 +96,16 @@ fn copy_string_to_buffer(string: String) -> JoshutoResult<()> { let clipboards = [ ( "wl-copy", - format!("printf '%s' {} | {} 2> /dev/null", string, "wl-copy"), + format!("printf '%s' '{}' | {} 2> /dev/null", string, "wl-copy"), ), ( "xsel", - format!("printf '%s' {} | {} -ib 2> /dev/null", string, "xsel"), + format!("printf '%s' '{}' | {} -ib 2> /dev/null", string, "xsel"), ), ( "xclip", format!( - "printf '%s' {} | {} -selection clipboard 2> /dev/null", + "printf '%s' '{}' | {} -selection clipboard 2> /dev/null", string, "xclip" ), ),