mdk icon indicating copy to clipboard operation
mdk copied to clipboard

Add support for chained aliases

Open andrewnicols opened this issue 6 years ago • 1 comments

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

andrewnicols avatar May 20 '19 01:05 andrewnicols

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.

FMCorz avatar May 20 '19 01:05 FMCorz