From 066a65487a8937f1754b3daf246702fdbf9f3a5c Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 24 May 2026 00:10:17 +0300 Subject: fix(repl): correct misleading comments in commands.go - Fix cmdStack doc comment: it redirects to 'rpn show' rather than displaying stack state directly (has no access to RPN state) - Add missing 'rat' and 'stack' to cmdHelp's fallback available commands list --- internal/repl/commands.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'internal/repl') diff --git a/internal/repl/commands.go b/internal/repl/commands.go index 3f5a15e..5698478 100644 --- a/internal/repl/commands.go +++ b/internal/repl/commands.go @@ -117,7 +117,7 @@ Press Ctrl+D or type 'quit'/'exit' to exit. case "quit", "exit": return "quit / exit - Exit the REPL\nUsage: quit or exit" default: - return fmt.Sprintf("No help available for: %s\nAvailable commands: help, clear, quit, exit, rpn, calc", subCmd) + return fmt.Sprintf("No help available for: %s\nAvailable commands: help, clear, quit, exit, rpn, calc, rat, stack", subCmd) } } @@ -140,10 +140,10 @@ func cmdQuit() error { return nil } -// cmdStack displays the current RPN stack state. -// It shows the stack depth and each value with its index. +// cmdStack provides a hint for viewing the RPN stack. +// It does not have access to RPN state; users should use 'rpn show' instead. // -// Returns the formatted stack output as a string +// Returns a hint string directing users to the 'rpn show' command func cmdStack() string { return "Use 'rpn show' to view the current stack state" } -- cgit v1.2.3