Contents tagged with Alias
-
How to make alias for jar command
Hello everybody,
today I want to write few words about aliases in Powershell. First of all, why somebody may need aliases? Need in aliases arises, when you have some kind of big cumbersome commands. For example recently I've got a need to execute something like this:
java -jar f:\utils\ANTLR\tpantlr2-code\code\antlr-4.7.1-complete.jar
As you can see from the length, to type such a long string is pretty hard, even if you copy/paste it. In that case I've decided to use aliases.
My initial approach was like this:
Set-Alias antlr4 'java -jar f:\utils\ANTLR\tpantlr2-code\code\antlr-4.7.1-complete.jar
But when I've tried to execute such alias, Ive got the following error message:
antlr4 : … more