Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Please implement auto-handling of ${HOME}/.zsh/
- X-seq: zsh-users 17717
- From: Moritz Bunkus <moritz@xxxxxxxxxx>
- To: Larry Schrof <larrys@xxxxxx>
- Subject: Re: Please implement auto-handling of ${HOME}/.zsh/
- Date: Wed, 20 Mar 2013 20:54:22 +0100
- Cc: "zsh-users@xxxxxxx" <zsh-users@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=bunkus.org; s=mail2013010701; t=1363809263; bh=HaCy80HPX92oHsRIgHHpnTfa81wHCOZRLPU5cZ2FJBA=; h=In-Reply-To:References:Date:Subject:From:To:Cc; b=XHgdRkmiLUnlUb/guYQwHRhRwHf9CPKawwasN5zksc6IMYPxoi5MPtKzj04QNQ1zK I86vqD60jKtfypm5SC3zyYmXfwmHANgYkGV5zM2YKji5hUr8KX6xbMoV0lOH3s6MmJ +aQUgI4PV4nt3oYwqKA2UpTj02Rw+oXYHerb3JzE=
- In-reply-to: <ED2B935DE024BE43B79F5C1268FCE9EB58E59561@PRN-MBX01-2.TheFacebook.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <ED2B935DE024BE43B79F5C1268FCE9EB58E59561@PRN-MBX01-2.TheFacebook.com>
Hey,
I'd love to have this, but two things that could be made even better
in my opinion:
1. Check $XDG_CONFIG_HOME/zsh as well as ~/.zsh. The former is from
the XDG Base Directory Specification[1] which I'd love to see zsh
follow. $XDG_CONFIG_HOME defaults to ~/.config if unset.
2. If one of those directories exists then look for $that_dir/zshenv
and not $that_dir/.zshenv. Hiding the files only makes sense for
$HOME, not for a sub-directory. Same should be true for
$that_dir/zshrc and the other files.
So my proposal would be:
- Look for an existing directory $XDG_CONFIG_HOME/zsh (if
$XDG_CONFIG_HOME is unset assume default $HOME/.config) or $HOME/.zsh
- If that directory exists set ZDOTDIR to it and read configuration
files from that directory. The files are not prefixed with .
- If that directory does not exist then proceed as before: read
configuration files from $HOME, the files are prefixed with .
Kind regards,
mosu
Messages sorted by:
Reverse Date,
Date,
Thread,
Author