ruby/test/irb
Stan Lo 7fe5f0a1d0 [ruby/irb] Introduce cd command
(https://github.com/ruby/irb/pull/971)

It's essentially a combination of pushws and popws commands that are
easier to use.

Help message:

```
Usage: cd ([target]|..)

IRB uses a stack of workspaces to keep track of context(s), with `pushws` and `popws` commands to manipulate the stack.
The `cd` command is an attempt to simplify the operation and will be subject to change.

When given:
- an object, cd will use that object as the new context by pushing it onto the workspace stack.
- "..", cd will leave the current context by popping the top workspace off the stack.
- no arguments, cd will move to the top workspace on the stack by popping off all workspaces.

Examples:

  cd Foo
  cd Foo.new
  cd @ivar
  cd ..
  cd
```

https://github.com/ruby/irb/commit/4a0e0e89b7
2024-07-03 17:17:42 +00:00
..
command [ruby/irb] Introduce cd command 2024-07-03 17:17:42 +00:00
yamatanooroti [ruby/irb] Cache RDoc::RI::Driver.new 2024-03-25 11:48:11 +00:00
helper.rb Sync IRB 241e061 2024-05-02 14:33:30 -04:00
test_color.rb [ruby/irb] Accept " " for colorizing "\t" test 2024-04-18 11:48:13 +00:00
test_color_printer.rb Load rubygems explicitly for tests of test/irb 2024-02-19 11:34:32 +09:00
test_command.rb [ruby/irb] Improve how command calls' return value is handled 2024-06-18 15:15:23 +00:00
test_completion.rb [ruby/irb] Command implementation not by method 2024-04-10 16:52:53 +00:00
test_context.rb [ruby/irb] Fix % escape in prompt format 2024-04-18 14:46:55 +00:00
test_debugger_integration.rb [ruby/irb] Use flag instead of caller for `debug`'s binding.irb 2024-05-04 03:22:17 +00:00
test_eval_history.rb [ruby/irb] Update error message assertions for Ruby 3.4 2024-02-19 10:48:38 +09:00
test_evaluation.rb [ruby/irb] Don't echo an expression's result when it ends with a 2023-08-11 16:18:58 +00:00
test_helper_method.rb [ruby/irb] Memoize helper method instances with Singleton module 2024-04-24 18:32:55 +00:00
test_history.rb [ruby/irb] Fix irb_history saved to current directory 2024-03-16 15:20:03 +00:00
test_init.rb [ruby/irb] Cleanup irbrc generator cache always at teardown 2024-06-12 07:48:03 +00:00
test_input_method.rb [ruby/irb] Cache RDoc::RI::Driver.new 2024-03-25 11:48:11 +00:00
test_irb.rb [ruby/irb] Improve how command calls' return value is handled 2024-06-18 15:15:23 +00:00
test_locale.rb [ruby/irb] Use a more tolerant way to check Locale#find's return 2023-04-26 16:52:51 +00:00
test_nesting_parser.rb [ruby/irb] Fix undef and alias indent 2024-01-30 12:55:47 +00:00
test_option.rb [ruby/irb] Stanardise test class names with `Test` postfix instead 2023-06-13 11:02:26 +00:00
test_raise_exception.rb [ruby/irb] Update error message assertions for Ruby 3.4 2024-02-19 10:48:38 +09:00
test_ruby_lex.rb [ruby/irb] Omit 2 encoding error related tests for TruffleRuby 2024-01-31 23:44:15 +00:00
test_tracer.rb Load rubygems explicitly for tests of test/irb 2024-02-19 11:34:32 +09:00
test_type_completor.rb [ruby/irb] Command implementation not by method 2024-04-10 16:52:53 +00:00
test_workspace.rb Load rubygems explicitly for tests of test/irb 2024-02-19 11:34:32 +09:00