Skip to content

Commit

Permalink
add shortcut for terminal command
Browse files Browse the repository at this point in the history
  • Loading branch information
tonexu committed Apr 23, 2020
1 parent 81a6e02 commit bc137b8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions set_terminal_command_shortcut.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
This is for setting up the shortcut commands in Mac terminal
For example, if I type ```cts``` in my terminal, it will directly link to the lab server
How?
1. I used oh-my-zsh from here https://ohmyz.sh/ but it would work for regular terminals too
2a. If you use oh-my-zsh: You find ```~/.zshrc```.
2b. If you just use default terminal, just open ```~/.bash_profile```.
3. I installed Atom as my text editor so I can open it from my terminal ```atom ~/.zshrc``` to edit it. But any text editor tools would work. If you open it from your desktop, you may need to view invisible files to see it.
4. Add under "alias" and save the file. For example ```alias cts = "ssh [email protected]"```. Next time, I entered ```cts``` in my terminal, it would directly execute the command.


Other helpful shortcut can be found here:
https://medium.com/the-lazy-developer/five-life-changing-git-aliases-e4211c090017

0 comments on commit bc137b8

Please sign in to comment.