zsh-users
 help / color / mirror / code / Atom feed
* Using a separate config file, without disturbing the system's
@ 2007-03-14  7:41 Ligesh
  2007-03-14 10:00 ` Peter Stephenson
  0 siblings, 1 reply; 3+ messages in thread
From: Ligesh @ 2007-03-14  7:41 UTC (permalink / raw)
  To: zsh-users


 If you want zsh to parse your custom configuration file in the non-interactive mode, currently it seems, the only way is to add it to .zshenv file. Now I want to start a session with a completely different configuration file and stay in that config file till the end of the session.

 In bash I can do it by specifying --rcfile and then setting the BASH_ENV to the separate file.

 For instance,

 $ bash --rcfile ~/different_bashprofile

 and in the different_bashprofile

 I set, BASH_ENV=~/different_bashrc. 
 
 That way I can work on a system without interfering with the systems configuration at all. I have not been able to do the same on zsh, even though I have searched high and low. Can anyone tell me if such a thing is possible?

 Thanks in advance.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Using a separate config file, without disturbing the system's
  2007-03-14  7:41 Using a separate config file, without disturbing the system's Ligesh
@ 2007-03-14 10:00 ` Peter Stephenson
  2007-03-16  7:24   ` Ligesh
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Stephenson @ 2007-03-14 10:00 UTC (permalink / raw)
  To: zsh-users

Ligesh wrote:
>  If you want zsh to parse your custom configuration file in the non-interacti
> ve mode, currently it seems, the only way is to add it to .zshenv file. Now I
>  want to start a session with a completely different configuration file and s
> tay in that config file till the end of the session.

% mkdir ~/zdotdir
% echo "echo Wow, I just used the alternative .zshrc" >~/zdotdir/.zshrc
% ZDOTDIR=~/zdotdir zsh
Wow, I just used the alternative .zshrc
% printenv ZDOTDIR
/home/pws/zdotdir

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


To access the latest news from CSR copy this link into a web browser:  http://www.csr.com/email_sig.php

To get further information regarding CSR, please visit our Investor Relations page at http://ir.csr.com/csr/about/overview


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Using a separate config file, without disturbing the system's
  2007-03-14 10:00 ` Peter Stephenson
@ 2007-03-16  7:24   ` Ligesh
  0 siblings, 0 replies; 3+ messages in thread
From: Ligesh @ 2007-03-16  7:24 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: zsh-users

 Hey, that worked. A bit too dramatic answer for my tastes, but hey, can't argue with results. :-) 

 Thanks.

On Wed, Mar 14, 2007 at 10:00:32AM +0000, Peter Stephenson wrote:
> Ligesh wrote:
> >  If you want zsh to parse your custom configuration file in the non-interacti
> > ve mode, currently it seems, the only way is to add it to .zshenv file. Now I
> >  want to start a session with a completely different configuration file and s
> > tay in that config file till the end of the session.
> 
> % mkdir ~/zdotdir
> % echo "echo Wow, I just used the alternative .zshrc" >~/zdotdir/.zshrc
> % ZDOTDIR=~/zdotdir zsh
> Wow, I just used the alternative .zshrc
> % printenv ZDOTDIR
> /home/pws/zdotdir
> 
> -- 
> Peter Stephenson <pws@csr.com>                  Software Engineer
> CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
> Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070
> 
> 
> To access the latest news from CSR copy this link into a web browser:  http://www.csr.com/email_sig.php
> 
> To get further information regarding CSR, please visit our Investor Relations page at http://ir.csr.com/csr/about/overview


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-03-16  7:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-14  7:41 Using a separate config file, without disturbing the system's Ligesh
2007-03-14 10:00 ` Peter Stephenson
2007-03-16  7:24   ` Ligesh

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).