[tor-commits] [sandboxed-tor-browser/master] Add a `-h` command line flag that prints usage.

yawning at torproject.org yawning at torproject.org
Wed Dec 21 21:01:08 UTC 2016


commit 907eb933441afecaa2252c1fa1e1ed831fef4356
Author: Yawning Angel <yawning at schwanenlied.me>
Date:   Wed Dec 21 21:00:41 2016 +0000

    Add a `-h` command line flag that prints usage.
---
 ChangeLog                                       | 1 +
 src/cmd/sandboxed-tor-browser/internal/ui/ui.go | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index ace155d..ae90e9c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,7 @@ Changes in version 0.0.3 - UNRELEASED:
    on certain pages.
  * Bug 20973: Silence Gdk warnings on systems with integrated png loader.
  * Bug 20806: Try even harder to exclude gstreamer.
+ * Add a `-h` command line flag that prints usage.
  * Remove the unused `pulseAudioBox` identifier.
  * Set the security slider to "High" by default on a fresh install.
  * Store the version of the sandbox in the config file, and re-Sync() the
diff --git a/src/cmd/sandboxed-tor-browser/internal/ui/ui.go b/src/cmd/sandboxed-tor-browser/internal/ui/ui.go
index cd3767c..ba0f293 100644
--- a/src/cmd/sandboxed-tor-browser/internal/ui/ui.go
+++ b/src/cmd/sandboxed-tor-browser/internal/ui/ui.go
@@ -164,7 +164,11 @@ func (c *Common) Run() error {
 	)
 
 	// Parse the command line flags.
+	halp := flag.Bool("h", false, "Print usage and esit.")
 	flag.Parse()
+	if *halp {
+		flag.Usage()
+	}
 	for _, v := range flag.Args() {
 		switch strings.ToLower(v) {
 		case cmdInstall:



More information about the tor-commits mailing list