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.
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.
In the above example, typing foobar
is 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 echo
that we really wish had been named print
.
Let's take it a step further and alias the alias!
Running cout brad
is the same as running print brad
which is the same as running echo brad
. Try not to get dizzy when doing this, please.
Last updated