[Lvlug] Part II - My alias not available in ssh remote command
fingolfin at thelinuxlink.net
Thu Jul 28 13:30:58 EDT 2005
On Thu, 28 Jul 2005, Paul Ryan wrote:
> Ok, I guess I made the last example too complex so it didn't get read
> completely through. Thanks for your replies so far. Yes, I know that
> .profile isn't sourced during an ssh remote command, and "yes" all my aliases
> are in .bashrc, which is sourced. As a matter of fact, I have a line in
> .profile which reads ". $HOME/.bashrc" so I get a consistant interface from
> all logins. Unlike .kshrc, .bashrc isn't sourced on a normal interactive
> login unless forced. To see that .bashrc is actually being sourced, I placed
> "echo In the .bashrc file"
> command inside it so you can see below that it IS being sourced.
Clever...I was not able to find any reason why aliases would not expand
other than the fact that it's not interactive. Ex:
sh -c 'shopt -q -s expand_aliases && source ~/.profile && ll'
I have read that functions behave better anyway
More information about the Lvlug