New Upstream Snapshot - golang-github-zyedidia-clipboard
Ready changes
Summary
Merged new upstream version: 1.0.4+ds (was: 1.0.3).
Resulting package
Built on 2023-02-08T19:49 (took 3m32s)
The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:
apt install -t fresh-snapshots golang-github-zyedidia-clipboard-dev
Lintian Result
Diff
diff --git a/clipboard_unix.go b/clipboard_unix.go
index 629258d..75539b4 100644
--- a/clipboard_unix.go
+++ b/clipboard_unix.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build freebsd || linux || netbsd || openbsd || solaris || dragonfly
// +build freebsd linux netbsd openbsd solaris dragonfly
package clipboard
@@ -15,6 +16,8 @@ import (
const (
xsel = "xsel"
xclip = "xclip"
+ powershell = "powershell.exe"
+ winclip = "clip.exe"
wlcopy = "wl-copy"
wlpaste = "wl-paste"
termuxClipboardGet = "termux-clipboard-get"
@@ -25,6 +28,8 @@ var (
pasteCmdArgs map[string][]string
copyCmdArgs map[string][]string
+ trimDos bool
+
xselPasteArgs = map[string][]string{
"primary": []string{xsel, "--output"},
"clipboard": []string{xsel, "--output", "--clipboard"},
@@ -61,6 +66,15 @@ var (
"clipboard": []string{termuxClipboardSet},
}
+ powershellPasteArgs = map[string][]string{
+ "primary": []string{powershell, "Get-Clipboard"},
+ "clipboard": []string{powershell, "Get-Clipboard"},
+ }
+ winclipCopyArgs = map[string][]string{
+ "primary": []string{winclip},
+ "clipboard": []string{winclip},
+ }
+
missingCommands = errors.New("No clipboard utilities available. Please install xsel, xclip, wl-clipboard or Termux:API add-on for termux-clipboard-get/set.")
internalClipboards map[string]string
@@ -138,6 +152,16 @@ func initialize() error {
}
}
+ pasteCmdArgs = powershellPasteArgs
+ copyCmdArgs = winclipCopyArgs
+
+ if _, err := exec.LookPath(winclip); err == nil {
+ if _, err := exec.LookPath(powershell); err == nil {
+ trimDos = true
+ return nil
+ }
+ }
+
if internalClipboards == nil {
internalClipboards = make(map[string]string)
}
@@ -166,7 +190,11 @@ func readAll(register string) (string, error) {
if err != nil {
return "", err
}
- return string(out), nil
+ result := string(out)
+ if trimDos && len(result) > 1 {
+ result = result[:len(result)-2]
+ }
+ return result, nil
}
func writeAll(text, register string) error {
diff --git a/debian/changelog b/debian/changelog
index 5d4e7e6..02ce3db 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+golang-github-zyedidia-clipboard (1.0.4+ds-1) UNRELEASED; urgency=low
+
+ * New upstream release.
+
+ -- Debian Janitor <janitor@jelmer.uk> Wed, 08 Feb 2023 19:47:18 -0000
+
golang-github-zyedidia-clipboard (1.0.3-1) unstable; urgency=medium
[ Jongmin Kim ]
Debdiff
File lists identical (after any substitutions)
No differences were encountered in the control files