-
Notifications
You must be signed in to change notification settings - Fork 1.8k
SC2139
koalaman edited this page May 8, 2014
·
5 revisions
alias whereami="echo $PWD"
alias whereami='echo $PWD'
With double quotes, this particular alias will be defined as echo /home/me
, so it will always print the same path. This is rarely intended.
By using single quotes or escaping any expansions, we define the alias as echo $PWD
, which will be expanded when we use the alias. This is the far more common use case.
If you don't mind that your alias definition is expanded at compile time, you can ignore this warning.