makansij
makansij

Reputation: 9865

Using alias in cygwin doesn't recognize?

I have the following alias:

alias gmail='https://gmail.com'

And, I try to execute it as follows in Cygwin:

cygstart chrome  gmail

But, it treat "gmail" literally as the web address "gmail" and not the alias https://gmail.com

Question: Why is it not using the alias?

Upvotes: 1

Views: 114

Answers (1)

that other guy
that other guy

Reputation: 123470

Shell aliases only apply to the first word in a command. They can not be used to replace strings in the middle of commands.

Consider using a variable instead:

gmail='https://gmail.com'
cygstart chrome "$gmail"

Upvotes: 3

Related Questions