Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add workspace category #661

Merged
merged 2 commits into from
Aug 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,15 @@ Hello World

The following commands are available on IRB. You can get the same output from the `show_cmds` command.


```
IRB
Workspace
cwws Show the current workspace.
chws Change the current workspace to an object.
workspaces Show workspaces.
pushws Push an object to the workspace stack.
popws Pop a workspace from the workspace stack.

IRB
irb_load Load a Ruby file.
irb_require Require a Ruby file.
source Loads a given file in the current session.
Expand Down Expand Up @@ -119,6 +120,7 @@ Misc
measure `measure` enables the mode to measure processing time. `measure :off` disables it.

Context
help [DEPRECATED] Enter the mode to look up RI documents.
show_doc Enter the mode to look up RI documents.
ls Show methods, constants, and variables. `-g [query]` or `-G [query]` allows you to filter out the output.
show_source Show the source code of a given method or constant.
Expand Down
4 changes: 2 additions & 2 deletions lib/irb/cmd/chws.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module IRB
module ExtendCommand

class CurrentWorkingWorkspace < Nop
category "IRB"
category "Workspace"
description "Show the current workspace."

def execute(*obj)
Expand All @@ -22,7 +22,7 @@ def execute(*obj)
end

class ChangeWorkspace < Nop
category "IRB"
category "Workspace"
description "Change the current workspace to an object."

def execute(*obj)
Expand Down
6 changes: 3 additions & 3 deletions lib/irb/cmd/pushws.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module IRB

module ExtendCommand
class Workspaces < Nop
category "IRB"
category "Workspace"
description "Show workspaces."

def execute(*obj)
Expand All @@ -21,7 +21,7 @@ def execute(*obj)
end

class PushWorkspace < Workspaces
category "IRB"
category "Workspace"
description "Push an object to the workspace stack."

def execute(*obj)
Expand All @@ -31,7 +31,7 @@ def execute(*obj)
end

class PopWorkspace < Workspaces
category "IRB"
category "Workspace"
description "Pop a workspace from the workspace stack."

def execute(*obj)
Expand Down