Ad-hoc Command Aliases
Do you ever get tired of typing some built in commands and you'd like to just alias them as something simpler? You can create arbitrary alises now that reduce the amount of typing you do.
config set command.aliases.cca="coldbox create app"
In the above example, it's the same thing as typing
coldbox create app myApp.
Aliases are treated as in-place shell expansions so you can alias anything including default parameters as well as multiple commands chained together.
config set command.aliases.foobar="echo brad | grep brad | sed s/rad/foo/ > foo.txt && cat foo.txt"
In the above example, typing
foobaris the same as running the giant command string that's being set into the alias.
If you create an alias that matches an existing command name, your alias will take precedence since aliases are expanded before commands are resolved.
Here we can change the name of a common command like
echothat we really wish had been named
config set command.aliases.print=echo
Let's take it a step further and alias the alias!
config set command.aliases.cout=print
cout bradis the same as running
print bradwhich is the same as running
echo brad. Try not to get dizzy when doing this, please.