Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Please implement auto-handling of ${HOME}/.zsh/

On Wed, Mar 20, 2013 at 07:16:39PM +0000, Larry Schrof wrote:
> I have been dying for this for many years.  I have a ton of zsh configs,
> so I like to organize them in ~/.zsh/ , but here's the problem.
> First, I have to create a symlink ~/.zshenv and point it to ~/.zsh/.zshenv
> Then, as the first thing to do in ~/.zsh/.zshenv, I have to do:
>    export ZDOTDIR=${HOME}/.zsh
> This is janky and is messier than it needs to be.

Yes, but OTOH you only have to do it once.  

> It would be awesome if something like the following happened. Forgive me
> if the implementation is flawed; just note the spirit of my suggestion.
> - Before zsh begins to process the first user-based config file
>   (I believe ~/.zshenv), look for the existence of ~/.zsh/ (a directory).
> - If this directory does not exist, proceed normally. (Start reading
> ~/.zshenv)
> - If this directory DOES exist:
> ---> Automatically set ZDOTDIR to ${HOME}/.zsh/
> ---> Ignore any ~/.zsh* files (If the user is using ~/.zsh/ it's their job
> to
>      understand that ~/.zsh* files won't be read.)
> --> Begin reading ${HOME}/.zsh/.zshenv

Interesting, but some people (well, *I*) have already organized their 
~/.zsh/* differently and this change would break things.

> What's the likelihood this would be implemented in the near future?

I hope it isn't -- IMNSHO janky is better than something that might 
break things and that would complicate the already complicated startup 
process (and add to its long and complicated documentation).


Paul Hoffman <nkuitse@xxxxxxxxxxx>

Messages sorted by: Reverse Date, Date, Thread, Author