summaryrefslogtreecommitdiffstats
path: root/pkg/commands
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2020-08-23 22:04:24 +1000
committerJesse Duffield <jessedduffield@gmail.com>2020-08-26 07:53:43 +1000
commitafd669194ad73f85e21d5dfd6d8f0ec26286ca5e (patch)
treeef8cb4305aee51625c7a227a77fb4e6d6ffcf1d3 /pkg/commands
parent1494a3863da457eb023178fdcc0512d59e73acbe (diff)
use clipboard package to handle clipboard stuff
Diffstat (limited to 'pkg/commands')
-rw-r--r--pkg/commands/os.go10
1 files changed, 2 insertions, 8 deletions
diff --git a/pkg/commands/os.go b/pkg/commands/os.go
index 81ebf951a..74bcd1a78 100644
--- a/pkg/commands/os.go
+++ b/pkg/commands/os.go
@@ -14,6 +14,7 @@ import (
"github.com/go-errors/errors"
+ "github.com/atotto/clipboard"
"github.com/jesseduffield/lazygit/pkg/config"
"github.com/jesseduffield/lazygit/pkg/utils"
"github.com/mgutz/str"
@@ -475,12 +476,5 @@ func RunLineOutputCmd(cmd *exec.Cmd, onLine func(line string) (bool, error)) err
}
func (c *OSCommand) CopyToClipboard(str string) error {
- commandTemplate := c.Config.GetUserConfig().GetString("os.copyToClipboardCommand")
- templateValues := map[string]string{
- "str": c.Quote(str),
- }
-
- command := utils.ResolvePlaceholderString(commandTemplate, templateValues)
-
- return c.RunCommand(command)
+ return clipboard.WriteAll(str)
}