Skip to content

Alias and config #25

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

Merged
merged 18 commits into from
Apr 26, 2014
Merged

Alias and config #25

merged 18 commits into from
Apr 26, 2014

Conversation

dantleech
Copy link
Member

This PR adds support for user configuration and aliases.

The shell:config:init command creates a default configuration for the user:

PHPCR> shell:config:init

Which creates ~/.phpcrsh/aliases.yml

This YAML file contains a list of command alises, which can be listed:

PHPCR > shell:alias:list
+------------+----------------------------------+
| Alias      | Command                          |
+------------+----------------------------------+
| aliases    | shell:alias:list                 |
| use        | workspace:use                    |
| workspaces | workspace:list                   |
| select     | query:select                     |
| cd         | shell:path:change {arg1}         |
| rm         | node:remove {arg1}               |
| mv         | node:move {arg1} {arg2}          |
| pwd        | shell:path:show                  |
| exit       | shell:exit                       |
| ls         | node:list {arg1}                 |
| sl         | node:clone {arg1} {arg2}         |
| cp         | node:copy {arg1} {arg2}          |
| cat        | node:property:show {arg1}        |
| vim        | node:property:edit {arg1} {arg2} |
| nano       | node:property:edit {arg1} {arg2} |
| man        | help {arg1}                      |
| checkin    | version:checkin {arg1}           |
| checkout   | version:checkout {arg1}          |
| checkpoint | version:checkpoint {arg1}        |
| lsversion  | version:history {arg1}           |
+------------+----------------------------------+

This PR also cleans up a few things and adds an Event Dispatcher to the ShellApplication

@dantleech
Copy link
Member Author

Tidied up the ShellApplication a bit. Probably want to implement EventListeners soon to make sure it doesn't grow into a monster.

todo: Make alias subscriber to create command based on alias (or not)
@dantleech
Copy link
Member Author

Alias functionality now "works", but still need to build up some surrounding infrastructure.

dantleech added a commit that referenced this pull request Apr 26, 2014
@dantleech dantleech merged commit e974c27 into master Apr 26, 2014
@dantleech dantleech deleted the alias_and_config branch April 26, 2014 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant