Skip to content

Commit

Permalink
Move these out of the top-level, to avoid clutter.
Browse files Browse the repository at this point in the history
  • Loading branch information
gcla committed Nov 10, 2019
1 parent fe8df3b commit 9cbaff8
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion extcmds.go → system/extcmds.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

// +build !darwin,!android,!windows

package termshark
package system

var CopyToClipboard = []string{"xsel", "-i", "-b"}

Expand Down
2 changes: 1 addition & 1 deletion extcmds_android.go → system/extcmds_android.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// code is governed by the MIT license that can be found in the LICENSE
// file.

package termshark
package system

var CopyToClipboard = []string{"termux-clipboard-set"}

Expand Down
2 changes: 1 addition & 1 deletion extcmds_darwin.go → system/extcmds_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// code is governed by the MIT license that can be found in the LICENSE
// file.

package termshark
package system

var CopyToClipboard = []string{"pbcopy"}

Expand Down
2 changes: 1 addition & 1 deletion extcmds_windows.go → system/extcmds_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// code is governed by the MIT license that can be found in the LICENSE
// file.

package termshark
package system

var CopyToClipboard = []string{"clip"}

Expand Down
2 changes: 1 addition & 1 deletion ui/ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ func openCopyChoices(copyLen int, app gowid.IApp) {

copyCmd := termshark.ConfStringSlice(
"main.copy-command",
termshark.CopyToClipboard,
system.CopyToClipboard,
)

if len(copyCmd) == 0 {
Expand Down
5 changes: 3 additions & 2 deletions utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import (
"github.com/blang/semver"
"github.com/gcla/gowid"
"github.com/gcla/gowid/gwutil"
"github.com/gcla/termshark/system"
"github.com/gcla/termshark/widgets/resizable"
"github.com/mattn/go-isatty"
"github.com/pkg/errors"
Expand Down Expand Up @@ -795,7 +796,7 @@ func ApplyArguments(cmd []string, args []string) ([]string, int) {
func BrowseUrl(url string) error {
urlCmd := ConfStringSlice(
"main.browse-command",
OpenURL,
system.OpenURL,
)

if len(urlCmd) == 0 {
Expand Down Expand Up @@ -843,7 +844,7 @@ func CopyCommand(input io.Reader, cb interface{}) error {

copyCmd := ConfStringSlice(
"main.copy-command",
CopyToClipboard,
system.CopyToClipboard,
)

if len(copyCmd) == 0 {
Expand Down

0 comments on commit 9cbaff8

Please sign in to comment.