summaryrefslogtreecommitdiff
path: root/internal/repl/commands.go
AgeCommit message (Collapse)Author
2026-03-25docs: Add SPDX license headers to all .go source filesPaul Buetow
- Added 'SPDX-License-Identifier: MIT' and 'Copyright (c) 2026 Paul Buetow' headers - Files updated: 24 .go files across cmd/gt/, internal/calculator/, internal/repl/, internal/rpn/ The MIT license from LICENSE file is reflected in all source files.
2026-03-25docs: Add comprehensive Go documentation for REPL functionsPaul Buetow
- Enhanced NewREPL documentation with detailed parameter descriptions - Enhanced RunREPL documentation clarifying it's a convenience wrapper - Improved executor documentation explaining backward compatibility and testing usage - Enhanced defaultExecutor documentation with input processing details and panic recovery - Enhanced defaultCompleter documentation with tab-completion behavior details - Enhanced defaultGetCommandDescription documentation with command description details - Improved TTYChecker methods (IsTTY, EnsureTTY) documentation - Improved SignalHandler.Start method documentation All exported and non-exported functions in the REPL package now have comprehensive documentation comments that describe their purpose, parameters, and return values.
2026-03-24feat: Add RPN mode, rational number support, and improve REPLPaul Buetow
- Add RPN (Reverse Polish Notation) calculator with stack-based operations - Support precise rational number calculations using *big.Rat - Implement chain of responsibility pattern for command handling - Add auto-completion for built-in commands - Add history persistence with configurable max entries - Support standard operators: +, -, *, /, ^, %, lg, log, ln - Support hyper operators: [+], [-], [*], [/], [^], [%], [lg], [log], [ln] - Support stack manipulation: dup, swap, pop, show - Support variable assignments and management - Add rat mode for switching between float64 and rational calculations - Refactor calculator to return Calculation struct with formatting - Add proper version support (v0.3.0) All changes follow Go best practices with comprehensive test coverage.
2026-03-23Replace global variable with function in internal/repl/commands.goPaul Buetow
2026-03-23Replace global variable with function in internal/replPaul Buetow
2026-03-20internal/calculator/internal/repl: Add missing comments for exported functionsPaul Buetow
- Added Parse() comment in calculator.go - Updated Commands() comment in repl/commands.go to be more descriptive
2026-03-20internal/repl: Fix incorrect Vi mode documentation in help textPaul Buetow
The help text incorrectly claimed to document Vi mode keybindings. The go-prompt library only supports Common and Emacs key binding modes, not Vi mode. Updated the help text to accurately describe the actual key bindings supported (Emacs mode with Ctrl+A, Ctrl+E, etc.).
2026-03-20internal/repl: add RPN support to REPLPaul Buetow
- Import rpn package in repl.go - Add 'rpn' and 'calc' as built-in commands - Update executor to handle 'rpn <expr>' and 'calc <expr>' commands - Add rpn/calc descriptions to help text - All tests pass, go vet passes
2026-03-16bump version to v0.2.0v0.2.0Paul Buetow
- Add REPL mode with vi keybindings - Add built-in commands (help, clear, quit/exit) - Add mage repl target Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>