mirror of
https://github.com/rwinkhart/libmutton.git
synced 2026-08-27 20:36:29 -04:00
Fix compilation for Mac/Termux/Windows
This commit is contained in:
+2
-2
@@ -24,8 +24,8 @@ func CopyString(clearClipboardAutomatically bool, copySubject string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// getClipCommands returns the commands for pasting and clearing the clipboard contents.
|
// getClipCommands returns the commands for pasting and clearing the clipboard contents.
|
||||||
func getClipCommands() (*exec.Cmd, *exec.Cmd) {
|
func getClipCommands() (*exec.Cmd, *exec.Cmd, error) {
|
||||||
cmdClear := exec.Command("pbcopy")
|
cmdClear := exec.Command("pbcopy")
|
||||||
_ = back.WriteToStdin(cmdClear, "")
|
_ = back.WriteToStdin(cmdClear, "")
|
||||||
return exec.Command("pbpaste"), cmdClear
|
return exec.Command("pbpaste"), cmdClear, nil
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -24,8 +24,8 @@ func CopyString(clearClipboardAutomatically bool, copySubject string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// getClipCommands returns the commands for pasting and clearing the clipboard contents.
|
// getClipCommands returns the commands for pasting and clearing the clipboard contents.
|
||||||
func getClipCommands() (*exec.Cmd, *exec.Cmd) {
|
func getClipCommands() (*exec.Cmd, *exec.Cmd, error) {
|
||||||
cmdClear := exec.Command("termux-clipboard-set")
|
cmdClear := exec.Command("termux-clipboard-set")
|
||||||
_ = back.WriteToStdin(cmdClear, "")
|
_ = back.WriteToStdin(cmdClear, "")
|
||||||
return exec.Command("termux-clipboard-get"), cmdClear
|
return exec.Command("termux-clipboard-get"), cmdClear, nil
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -23,6 +23,6 @@ func CopyString(clearClipboardAutomatically bool, copySubject string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// getClipCommands returns the commands for pasting and clearing the clipboard contents.
|
// getClipCommands returns the commands for pasting and clearing the clipboard contents.
|
||||||
func getClipCommands() (*exec.Cmd, *exec.Cmd) {
|
func getClipCommands() (*exec.Cmd, *exec.Cmd, error) {
|
||||||
return exec.Command("powershell.exe", "-c", "Get-Clipboard"), exec.Command("powershell.exe", "-c", "Set-Clipboard")
|
return exec.Command("powershell.exe", "-c", "Get-Clipboard"), exec.Command("powershell.exe", "-c", "Set-Clipboard"), nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user