You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't have any specific need for this just now, but namespaces for commands could be a useful way of grouping commands if there are a lot.
I'm imagining something like this:
A namespace is defined as a sub-directory of the commands directory.
Any scripts within the sub-directory have their commands automatically prefixed with the name of the namespace. For instance, if we moved the hello-world script into a examples sub-directory, then the hello-world command would become examples:hello-world.
The command list could then show commands grouped by their namespaces, with any scripts in the top-level commands directory being shown without a namespace.
Existing scripts in the top-level commands directory would remain unchanged and would work as they do now.
If we do add command aliases, see Support for command aliases #6, aliases would not be namespaced, so in the above example, if the examples:hello-world command had the alias hello, you could run the command hello or examples:hello-world.
I don't have any specific need for this just now, but namespaces for commands could be a useful way of grouping commands if there are a lot.
I'm imagining something like this:
commandsdirectory.hello-worldscript into aexamplessub-directory, then thehello-worldcommand would becomeexamples:hello-world.commandsdirectory being shown without a namespace.commandsdirectory would remain unchanged and would work as they do now.examples:hello-worldcommand had the aliashello, you could run the commandhelloorexamples:hello-world.