diff --git a/demon.go b/demon.go index 88c3c62..171649a 100644 --- a/demon.go +++ b/demon.go @@ -91,7 +91,7 @@ func listen(history []string, histfile string, persist bool, max int) error { if persist { // make the copy buffer available to all applications, // even when the source has disappeared - if err := exec.Command("wl-copy", text).Run(); err != nil { + if err := exec.Command("wl-copy", []string{"--", text}...).Run(); err != nil { return fmt.Errorf("error running wl-copy (demon.91): %s", err) } } diff --git a/selector.go b/selector.go index eaa6d4f..9c1fc4c 100644 --- a/selector.go +++ b/selector.go @@ -20,7 +20,7 @@ func selector(history []string, max int) error { } // serve selection to the OS - if err := exec.Command("wl-copy", selected).Run(); err != nil { + if err := exec.Command("wl-copy", []string{"--", selected}...).Run(); err != nil { return err }