Is it possible to add a flag to a bash alias you create yourself? e.g.
con -a = 'ssh username@server1.domain.com'
con -b = 'ssh username@server2.domain.com'
|
Is it possible to add a flag to a bash alias you create yourself? e.g.
|
||||
|
|
|
Or, use a function instead of an alias:
|
|||||||||||||
|
|
Nope – aliases are simple text substitutions. Use different alias names instead:
EDIT if absolutely must have flags, a function will serve better than an alias – see @glenn-jackmann’s answer. |
||||
|
|