Navigation¶
Bcome is used by navigating to a namespace, and invoking the method of your choice.
That method may either be a built-in function (see: Command Menu), or a custom function you’ve added yourself as part of your installation, and available via the Registry (see Registry Overview).
You may either traverse your namespaces via The Console before invoking your method, or you may invoke it directly from your terminal using Keyed-Access.
Let’s imagine you have Namespaces laid out in the following parent-child relationship:
.
└── parent
└── child
└── grandchild
The Console¶
Bcome exposes a REPL (read-eval-print loop) shell, built on top of Ruby’s IRB (interactive Ruby) shell.
Each namespace is loaded into a distinct shell session, which you may then interact with directly.
Basic navigation¶
Enter the Console at the root namespace:
> bcome
List your namespaces:
> ls
Traverse to the ‘child’ namespace, and onward to ‘grandchild’:
> cd child
> cd grandchild
Go back up a level:
> back
Exit back to you terminal:
> exit!
Hint
For a full list of in-built commands see menu.
For accessing your custom commands, see the Registry (Registry Overview).
Keyed-Access¶
Bcome provides a shortcut to any namespace, referred to as Keyed-Access, where the namespace breadcrumb is included as a parameter to bcome
.
Enter the Console using Keyed-Access.¶
To enter the CLI directly at our ‘grandchild’ namespace, you would enter the following command:
> bcome child:grandchild
This allows you to start a Console session directly at the namespace you require, without having to traverse your tree.
Hint
Invoking ‘ls’ on any namespace will list its direct children, whilst invoking ‘tree’ on any namespace will list the Bcome tree structure beneath.
See Executing Commands for how to execute commands in Keyed-access or Console mode.