zsh-users
 help / color / mirror / code / Atom feed
* ZDOTDIR
@ 2000-01-06 14:11 Shao Zhang
  2000-01-08 20:25 ` ZDOTDIR V. L. Simpson
  0 siblings, 1 reply; 7+ messages in thread
From: Shao Zhang @ 2000-01-06 14:11 UTC (permalink / raw)
  To: ZSH Mail List

Hi,
	According to the man pages, ZDOTDIR is the directory used by zsh
	to search for shell startup files(.zshrc etc).

	But, what is the ideal place to define this variable?? I would
	really like to do it in .zshrc, but I cannot since zsh uses it
	to find where .zshrc is.

	Thanks for any help.

Shao.

-- 
____________________________________________________________________________
Shao Zhang - Running Debian 2.1  ___ _               _____
Department of Communications    / __| |_  __ _ ___  |_  / |_  __ _ _ _  __ _ 
University of New South Wales   \__ \ ' \/ _` / _ \  / /| ' \/ _` | ' \/ _` |
Sydney, Australia               |___/_||_\__,_\___/ /___|_||_\__,_|_||_\__, |
Email: shao@cia.com.au                                                  |___/ 
_____________________________________________________________________________


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

* Re: ZDOTDIR
  2000-01-06 14:11 ZDOTDIR Shao Zhang
@ 2000-01-08 20:25 ` V. L. Simpson
  0 siblings, 0 replies; 7+ messages in thread
From: V. L. Simpson @ 2000-01-08 20:25 UTC (permalink / raw)
  To: zsh-users

>>>>> "Shao" == Shao Zhang <shao@shaoz.dhs.org> writes:

    Shao> Hi, According to the man pages, ZDOTDIR is the directory
    Shao> used by zsh to search for shell startup files(.zshrc etc).

    Shao> 	But, what is the ideal place to define this variable??
    Shao> I would really like to do it in .zshrc, but I cannot since
    Shao> zsh uses it to find where .zshrc is.

    Shao> 	Thanks for any help.

    Shao> Shao.
Put it in $HOME/.zshenv
Heres mine as an example

#!/bin/zsh
ZDOTDIR=~/.zshell
export X11HOME=/usr/X11
export TEXHOME=/usr/share/texmf

path=(~/bin .)
path=($path /bin /usr/bin)
path=($path $X11HOME/bin /usr/local/bin)
path=($path $TEXHOME/bin)

Vance


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

* Re: zdotdir
  2014-03-10 15:32 ` zdotdir Bart Schaefer
@ 2014-03-10 17:28   ` Yuri D'Elia
  0 siblings, 0 replies; 7+ messages in thread
From: Yuri D'Elia @ 2014-03-10 17:28 UTC (permalink / raw)
  To: zsh-users

On 03/10/2014 04:32 PM, Bart Schaefer wrote:
> Just create symbolic links:
> 
> cd $ZDOTDIR
> for dotfile in zshenv zshrc zprofile zlogin; ln -s $dotfile .$dotfile
> 
> If for some reason you don't want to use symlinks, you can instead do
> 
> cd $ZDOTDIR
> for dotfile in zshenv zshrc zprofile zlogin
>   print "source \$ZDOTDIR/$dotfile" > .$dotfile
> 
> but that will print errors about missing files if you don't create all
> four of the dot-less ones, which the symlink approach will not.

Not fancy, but will do ;)
Thanks, didn't think about this.



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

* Re: zdotdir
  2014-03-10 11:51 zdotdir Yuri D'Elia
  2014-03-10 12:01 ` zdotdir Aaron Kaufman
@ 2014-03-10 15:32 ` Bart Schaefer
  2014-03-10 17:28   ` zdotdir Yuri D'Elia
  1 sibling, 1 reply; 7+ messages in thread
From: Bart Schaefer @ 2014-03-10 15:32 UTC (permalink / raw)
  To: zsh-users

On Mar 10, 12:51pm, Yuri D'Elia wrote:
}
} However, I would like then the files not to have a leading dot, so I
} could just have
} 
} ~/.zsh/zprofile like in /etc/.
} 
} Is it possible?

Just create symbolic links:

cd $ZDOTDIR
for dotfile in zshenv zshrc zprofile zlogin; ln -s $dotfile .$dotfile

If for some reason you don't want to use symlinks, you can instead do

cd $ZDOTDIR
for dotfile in zshenv zshrc zprofile zlogin
  print "source \$ZDOTDIR/$dotfile" > .$dotfile

but that will print errors about missing files if you don't create all
four of the dot-less ones, which the symlink approach will not.


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

* Re: zdotdir
  2014-03-10 12:01 ` zdotdir Aaron Kaufman
@ 2014-03-10 13:03   ` Yuri D'Elia
  0 siblings, 0 replies; 7+ messages in thread
From: Yuri D'Elia @ 2014-03-10 13:03 UTC (permalink / raw)
  To: zsh-users

On 03/10/2014 01:01 PM, Aaron Kaufman wrote:
> You can use 'source' to source any file name.
> 
> For example: source $HOME/.zsh/zprofile and so on.
> I hope that helps.

The only hook I have I zshenv, I cannot source the other files and get
the same effect from there.



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

* Re: zdotdir
  2014-03-10 11:51 zdotdir Yuri D'Elia
@ 2014-03-10 12:01 ` Aaron Kaufman
  2014-03-10 13:03   ` zdotdir Yuri D'Elia
  2014-03-10 15:32 ` zdotdir Bart Schaefer
  1 sibling, 1 reply; 7+ messages in thread
From: Aaron Kaufman @ 2014-03-10 12:01 UTC (permalink / raw)
  To: Yuri D'Elia; +Cc: zsh-users

[-- Attachment #1: Type: text/plain, Size: 467 bytes --]

You can use 'source' to source any file name.

For example: source $HOME/.zsh/zprofile and so on.
I hope that helps.
On Mar 10, 2014 4:55 AM, "Yuri D'Elia" <wavexx@thregr.org> wrote:

> I recently decided to move all my config files (.zshrc, .zprofile, etc)
> to ~/.zsh/, so in my ~/.zshenv I set:
>
> ZDOTDIR=~/.zsh
>
> However, I would like then the files not to have a leading dot, so I
> could just have
>
> ~/.zsh/zprofile like in /etc/.
>
> Is it possible?
>
>

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

* zdotdir
@ 2014-03-10 11:51 Yuri D'Elia
  2014-03-10 12:01 ` zdotdir Aaron Kaufman
  2014-03-10 15:32 ` zdotdir Bart Schaefer
  0 siblings, 2 replies; 7+ messages in thread
From: Yuri D'Elia @ 2014-03-10 11:51 UTC (permalink / raw)
  To: zsh-users

I recently decided to move all my config files (.zshrc, .zprofile, etc)
to ~/.zsh/, so in my ~/.zshenv I set:

ZDOTDIR=~/.zsh

However, I would like then the files not to have a leading dot, so I
could just have

~/.zsh/zprofile like in /etc/.

Is it possible?


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

end of thread, other threads:[~2014-03-10 17:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-01-06 14:11 ZDOTDIR Shao Zhang
2000-01-08 20:25 ` ZDOTDIR V. L. Simpson
2014-03-10 11:51 zdotdir Yuri D'Elia
2014-03-10 12:01 ` zdotdir Aaron Kaufman
2014-03-10 13:03   ` zdotdir Yuri D'Elia
2014-03-10 15:32 ` zdotdir Bart Schaefer
2014-03-10 17:28   ` zdotdir Yuri D'Elia

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).