blob: 5bb4b02780524dc80e29af0803ab691a62cdfb61 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
// Copyright (c) 2020 Teddy Wing
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
package browserenv
import "fmt"
// shellArgs are the command and arguments needed to run a string containing
// commands in a shell.
var shellArgs = []string{"cmd", "/c"}
// shell returns a Windows `cmd` shell and "/c" argument.
func shell() (args []string) {
return shellArgs
}
// shellEscapeCommand formats a browser command with url, ensuring url is
// properly shell-escaped.
func shellEscapeCommand(browser, url string) string {
return fmt.Sprintf("%s %s", browser, url)
}
|