From 91fdeb53d5b58fe0a554ef29c1384a50b1a9ec33 Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Tue, 10 Dec 2024 16:28:42 -0500 Subject: [PATCH] Do not infer MIME type when copying data on UNIX-like systems --- core/1globals.go | 2 +- core/copyUNIXGeneric.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/1globals.go b/core/1globals.go index 83ddd40..df44fa6 100644 --- a/core/1globals.go +++ b/core/1globals.go @@ -9,7 +9,7 @@ var ( ) const ( - LibmuttonVersion = "0.2.3" // untagged releases feature a letter suffix corresponding to the eventual release version, e.g "0.2.A" -> "0.2.0", "0.2.B" -> "0.2.1" + LibmuttonVersion = "0.2.E" // untagged releases feature a letter suffix corresponding to the eventual release version, e.g "0.2.A" -> "0.2.0", "0.2.B" -> "0.2.1" FSSpace = "\u259d" // ▝ space/list separator FSPath = "\u259e" // ▞ path separator diff --git a/core/copyUNIXGeneric.go b/core/copyUNIXGeneric.go index 2312ab2..947ff13 100644 --- a/core/copyUNIXGeneric.go +++ b/core/copyUNIXGeneric.go @@ -16,9 +16,9 @@ func copyField(executableName, copySubject string) { var cmd *exec.Cmd // determine whether to use wl-copy (Wayland) or xclip (X11) if _, envSet = os.LookupEnv("WAYLAND_DISPLAY"); envSet { - cmd = exec.Command("wl-copy") + cmd = exec.Command("wl-copy", "-t", "text/plain") } else if _, envSet = os.LookupEnv("DISPLAY"); envSet { - cmd = exec.Command("xclip", "-sel", "c") + cmd = exec.Command("xclip", "-sel", "c", "-t", "text/plain") } else { fmt.Println(AnsiError + "Clipboard platform could not be determined - Note that the clipboard does not function in a raw TTY" + AnsiReset) os.Exit(ErrorClipboard)