How to create shortcut command in Mac

5

I would like to a shortcut command in Mac as I frequently call commands that are a bit long in Terminal. How can I do that?

Tam

Posted 2010-04-09T04:33:22.257

Reputation: 243

Answers

5

alias if you're using Bash.

Hasaan Chop

Posted 2010-04-09T04:33:22.257

Reputation: 4 224

the problem is that it resets everytime I close and open Terminal. Is there a way to make it permanent? – Tam – 2010-04-09T04:37:50.513

3Put the alias into your .bashrc. – None – 2010-04-09T04:40:02.037

Or a function, depending on how complicated the shortcut in. Aliases are simple text substitutions. functions can have parameters and code behind it. But functions require some simple shell coding knowledge. – Rich Homolka – 2012-08-14T21:47:04.590

0

Save it as a .command but you may have to tamper around with the visibility settings.

Garrett

Posted 2010-04-09T04:33:22.257

Reputation: 1