santoku
santoku

Reputation: 3427

mac terminal shortcut not working

I intend to set up mac terminal shortcut per instructions but it does not work. This is what I did:

open terminal

nano .bash-profile
#add a few aliases
alias dtt = 'do this thing'
alias gc='git commit -m' 
#save the bash profile
source ~/.bash_profile

Afterwards the new alias are present in the bash file. However no autocomplete is present in terminal, if I type dtt, it won't change to 'do this thing'. The shortcut doesn't seem to work.

Anything amiss? Thanks

Upvotes: 1

Views: 414

Answers (1)

CFV
CFV

Reputation: 792

Alias is used to do something (in your ex. 'do this thing'), typing the command you chose ('dtt'). The terminal won't autocomplete anything. In fact alias instructs the shell to replace one string with another when executing commands. You could use it to abbreviate commands. e.g. alias pg="ping". If you type pg google.com it will exec "ping google.com"

Upvotes: 1

Related Questions