From 531820f3d60a301751c41d0aac5bbf5615f677b1 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 27 Apr 2025 23:23:25 +0900 Subject: feat: run "clock" subcommand if no subcommand is given --- cmd/root.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cmd/root.go') diff --git a/cmd/root.go b/cmd/root.go index 3efadab..5a91eae 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -7,6 +7,10 @@ import ( var rootCmd = &cobra.Command{ Use: "term-clock", Short: "A clock on your terminal", + // Run 'clock' subcommand by default. + Run: func(cmd *cobra.Command, args []string) { + clockCmd.Run(cmd, args) + }, } func init() { -- cgit v1.2.3-70-g09d2