fix: stop failing with text beginning with hyphen
This commit is contained in:
parent
b231836f35
commit
68d2543d24
2 changed files with 2 additions and 2 deletions
2
demon.go
2
demon.go
|
@ -91,7 +91,7 @@ func listen(history []string, histfile string, persist bool, max int) error {
|
||||||
if persist {
|
if persist {
|
||||||
// make the copy buffer available to all applications,
|
// make the copy buffer available to all applications,
|
||||||
// even when the source has disappeared
|
// 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)
|
return fmt.Errorf("error running wl-copy (demon.91): %s", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ func selector(history []string, max int) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// serve selection to the OS
|
// 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
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue