aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2020-12-20 15:32:44 +0100
committerTeddy Wing2020-12-20 15:32:44 +0100
commit832026cddb55d341a025427b3d5edf770a2d71ec (patch)
tree9f9029393bbc7ed624f01ead397f50f9eed5d63f
parent704b91ca02f87fe0f6d3e059aa2aeb8e3e823c14 (diff)
downloadbrowserenv-832026cddb55d341a025427b3d5edf770a2d71ec.tar.bz2
Rename `escapeBrowserCommand()` to `shellEscapeCommand()`
Didn't like `escapeBrowserCommand()` either, since we're escaping the URL not the rest of the command.
-rw-r--r--browserenv.go2
-rw-r--r--browserenv_unix.go2
-rw-r--r--browserenv_windows.go2
3 files changed, 3 insertions, 3 deletions
diff --git a/browserenv.go b/browserenv.go
index 678b651..ae1024f 100644
--- a/browserenv.go
+++ b/browserenv.go
@@ -82,7 +82,7 @@ func browserCommand(command, url string) *exec.Cmd {
if browserCommandIncludesURL(command) {
command = fmtWithURL(command, url)
} else {
- command = escapeBrowserCommand(command, url)
+ command = shellEscapeCommand(command, url)
}
args = append(args, command)
diff --git a/browserenv_unix.go b/browserenv_unix.go
index d2f9538..0e62fe5 100644
--- a/browserenv_unix.go
+++ b/browserenv_unix.go
@@ -19,7 +19,7 @@ func shell() (args []string) {
}
// TODO
-func escapeBrowserCommand(browser, url string) string {
+func shellEscapeCommand(browser, url string) string {
// TODO: handle %s in browser command
return fmt.Sprintf("%s '%s'", browser, url)
}
diff --git a/browserenv_windows.go b/browserenv_windows.go
index be90ba5..ac44d82 100644
--- a/browserenv_windows.go
+++ b/browserenv_windows.go
@@ -10,6 +10,6 @@ func shell() (args []string) {
}
// TODO
-func escapeBrowserCommand(browser, url string) string {
+func shellEscapeCommand(browser, url string) string {
return fmt.Sprintf("%s %s", browser, url)
}