summaryrefslogtreecommitdiff
path: root/lib/irb/cmd/history.rb
AgeCommit message (Collapse)Author
2024-02-16[ruby/irb] Standardize command related namesStan Lo
(https://github.com/ruby/irb/pull/873) * Replace ExtendCommand with Command and standardize command related names 1. Rename lib/irb/extend-command.rb to lib/irb/command.rb 2. Rename lib/irb/cmd/*.rb to lib/irb/command/*.rb 3. Rename test/irb/test_cmd.rb to test/irb/test_command.rb 4. Rename ExtendCommand to Command * Alias ExtendCommand to Command and deprecate it * Rename Command::Nop to Command::Base * Not deprecate old constants just yet * Add lib/irb/cmd/nop.rb back https://github.com/ruby/irb/commit/462c1284af
2023-12-02[ruby/irb] Implement `history` commandGary Tou
(https://github.com/ruby/irb/pull/761) * Implement `history` command Lists IRB input history with indices. Also aliased as `hist`. * Add tests for `history` command * Address feedback: `puts` with multiple arguments instead of `join`ing * Address feedback: Handle nil from splitting an empty input string * Refactor line truncation * Add `-g` grep option to `history` command * Add `history` command to README * Remove unused `*args` parameter * Allow spaces to be included in grep * Allow `/` to be included in grep regex * Handle `input` being an empty string * Exclude "#{index}: " from matching the grep regex * Add new line after joining https://github.com/ruby/irb/commit/3f9eacbfa9