Can't use aliases in non-interactive ssh command
Hi,
when I use ssh to open an interactive shell on my machine, I can use all the aliases I normally would on that machine. But when I use ssh to run a single non-interactive command, the aliases don't work. How can I fix this? Example: Code:
# sshhome is an alias to ssh to my home machine |
Quote:
You have two options: 1) convert the aliases in functions 2) add the following line to your .bashrc on the remote machine Code:
shopt -s expand_aliases |
Option 2 isn't working for me unfortunately. Also doesn't work if I do the shopt as part of the ssh command: ssh "shopt -s expand_aliases; [command]". Option 1 works fine, although feels kludgy. Thanks
|
All times are GMT -5. The time now is 04:13 PM. |