feat(completion): add positional arg completion

Amolith created

Add ValidArgsFunction for positional KEY arguments:
- area show: completes area keys
- goal show: completes goal keys

Assisted-by: Claude Opus 4 via Crush

Change summary

cmd/area/show.go | 6 ++++--
cmd/goal/show.go | 5 +++--
2 files changed, 7 insertions(+), 4 deletions(-)

Detailed changes

cmd/area/show.go 🔗

@@ -8,6 +8,7 @@ import (
 	"fmt"
 
 	"git.secluded.site/lune/internal/client"
+	"git.secluded.site/lune/internal/completion"
 	"git.secluded.site/lune/internal/config"
 	"git.secluded.site/lune/internal/deeplink"
 	"git.secluded.site/lune/internal/stats"
@@ -22,8 +23,9 @@ var ShowCmd = &cobra.Command{
 	Long: `Show detailed information for a configured area.
 
 Displays the area's name, ID, deeplink, goals, and uncompleted task count.`,
-	Args: cobra.ExactArgs(1),
-	RunE: runShow,
+	Args:              cobra.ExactArgs(1),
+	ValidArgsFunction: completion.Areas,
+	RunE:              runShow,
 }
 
 func runShow(cmd *cobra.Command, args []string) error {

cmd/goal/show.go 🔗

@@ -29,8 +29,9 @@ var ShowCmd = &cobra.Command{
 
 If the goal key exists in multiple areas, use --area to disambiguate.
 Displays the goal's name, ID, deeplink, and uncompleted task count.`,
-	Args: cobra.ExactArgs(1),
-	RunE: runShow,
+	Args:              cobra.ExactArgs(1),
+	ValidArgsFunction: completion.Goals,
+	RunE:              runShow,
 }
 
 func init() {