fix: show CLI help when running without arguments
Change shouldRunCLI() to return true when no args provided, allowing users to see available commands. Use --gui flag or browse command to launch GUI mode.
- commit
- f9090e3c7601f5d812694c81e066c4ee625b8d40
- author
- bnema · · 2025-10-18 11:30 UTC
- committer
- bnema · · 2025-10-18 11:32 UTC
- parent
- e91cdbb
- signature
- GPG Unverified
2B82207D370127A0The key is unknown
2 files · +3 -2
M CHANGELOG.md +1 -0
| @@ -22,6 +22,7 @@ All notable changes to this project will be documented in this file. | |||
| 22 | 22 | - Dark mode flash on startup: Set GTK dark theme preference and WebView background color before window/content creation | |
| 23 | 23 | - Cmd+Q and window close button now trigger graceful shutdown instead of killing the browser process | |
| 24 | 24 | - WebView cleanup: Properly destroy WebViews to prevent memory leaks and duplicate handler registrations when closing stacked panes | |
| 25 | + | - CLI help: Running `dumber` without arguments now shows available commands (use `--gui` or `browse` to launch GUI) | |
| 25 | 26 | ||
| 26 | 27 | ## [0.12.0] - 2025-10-16 | |
| 27 | 28 | ||
| @@ -22,6 +22,7 @@ All notable changes to this project will be documented in this file. | |||||
| 22 | - Dark mode flash on startup: Set GTK dark theme preference and WebView background color before window/content creation | 22 | - Dark mode flash on startup: Set GTK dark theme preference and WebView background color before window/content creation | ||
| 23 | - Cmd+Q and window close button now trigger graceful shutdown instead of killing the browser process | 23 | - Cmd+Q and window close button now trigger graceful shutdown instead of killing the browser process | ||
| 24 | - WebView cleanup: Properly destroy WebViews to prevent memory leaks and duplicate handler registrations when closing stacked panes | 24 | - WebView cleanup: Properly destroy WebViews to prevent memory leaks and duplicate handler registrations when closing stacked panes | ||
| 25 | + | - CLI help: Running `dumber` without arguments now shows available commands (use `--gui` or `browse` to launch GUI) | |||
| 25 | 26 | ||||
| 26 | ## [0.12.0] - 2025-10-16 | 27 | ## [0.12.0] - 2025-10-16 | ||
| 27 | 28 | ||||
M main.go +2 -2
| @@ -62,9 +62,9 @@ func main() { | |||
| 62 | 62 | ||
| 63 | 63 | // shouldRunCLI determines if we should run in CLI mode based on arguments | |
| 64 | 64 | func shouldRunCLI() bool { | |
| 65 | - | // No args = GUI landing page mode | |
| 65 | + | // No args = show CLI help with available commands | |
| 66 | 66 | if len(os.Args) <= 1 { | |
| 67 | - | return false | |
| 67 | + | return true | |
| 68 | 68 | } | |
| 69 | 69 | ||
| 70 | 70 | // Check for GUI-specific flags | |
| @@ -62,9 +62,9 @@ func main() { | |||||
| 62 | 62 | ||||
| 63 | // shouldRunCLI determines if we should run in CLI mode based on arguments | 63 | // shouldRunCLI determines if we should run in CLI mode based on arguments | ||
| 64 | func shouldRunCLI() bool { | 64 | func shouldRunCLI() bool { | ||
| 65 | - | // No args = GUI landing page mode | 65 | + | // No args = show CLI help with available commands |
| 66 | if len(os.Args) <= 1 { | 66 | if len(os.Args) <= 1 { | ||
| 67 | - | return false | 67 | + | return true |
| 68 | } | 68 | } | ||
| 69 | 69 | ||||
| 70 | // Check for GUI-specific flags | 70 | // Check for GUI-specific flags | ||