FMCorz / mdk

Moodle Development Kit. A collection of tools meant to make developers' lives easier.
GNU General Public License v3.0
85 stars 47 forks source link

Add support for chained aliases #178

Open andrewnicols opened 5 years ago

andrewnicols commented 5 years ago

This allows you to specify an array for an alias and have it execute each of the commands in turn.

For example you may specify the following configuration:

"co": [
    "fix",
    "pull -m fetch",
    "!git reset --hard FETCH_HEAD"
],

This will lead to the command mdk co 12345 running:

mdk fix 12345
mdk pull -m fetch 12345
git reset --hard FETCH_HEAD
FMCorz commented 5 years ago

Thanks Andrew, good idea!

Would you mind having a look through the alias command to handle this new format of aliases? Listing and show an alias could probably do with some tweaks to display lists.

We may always want to ensure that the add or set sub commands cannot be used with lists.