Put Bazaar behind a password
Martin Pool
mbp at sourcefrog.net
Thu Jun 14 03:34:58 BST 2007
On 6/14/07, John Arbash Meinel <john at arbash-meinel.com> wrote:
> > Yeah, the macports folks encourage you to add /opt/local/bin to your path using
> > .bash_rc or .profile or whatever. The idea is that everything run through
> > macports is in the opt folder, so if it all somehow gets totally borked you can
> > just dump the whole opt folder and start over without worrying about messing any
> > non macports things up.
>
> Sure, and I've done so. The problem is that when doing "ssh host command" which
> runs the command on the host, it doesn't seem to be loading my ~/.bashrc or
> ~/.zshrc. To give a specific example, I use 'zsh' as my default shell:
>
> $ ssh localhost 'zsh -i --login -c "echo $PATH"'
> Starting a new gpg-agent
> /usr/bin:/bin:/usr/sbin:/sbin
>
> The 'Starting' line is being executed in my .zshrc file, but notice that the
> PATH has not been updated. Why????
>
> Oh and if I do:
>
> $ ssh localhost 'zsh -c "echo $PATH"'
> /usr/bin:/bin:/usr/sbin:/sbin
>
> It isn't even loading .zshrc.
>
> But if I
> $ ssh localhost
> % echo $PATH
> /Users/jameinel/bin:/usr/local/bin:/opt/local/bin:...
zshrc is only used for interactive shells (approximately meaning when
there's a tty.) For this kind of thing you want zshenv, or maybe
zshprofile (only run for "login" shells; I'm not sure if this counts).
See man zsh. Since zshenv is run for every shell anything you do
there should be idempotent - ie you should check that the directory is
not already in the path.
--
Martin
More information about the bazaar
mailing list