How to migrate from madduck’s vcsh to RichiH’s vcsh

Dieter Plaetinck dieter at plaetinck.be
Tue Dec 13 10:57:56 CET 2011


On Tue, 13 Dec 2011 18:56:46 +1000
Bruce Schultz <bruce.schultz at gmail.com> wrote:

> 
> 
> On 13/12/11 07:19, Richard Hartmann wrote:
> > On Mon, Dec 12, 2011 at 18:02, Sean Whitton <sean at silentflame.com>
> > wrote:
> >
> >> 3) Set up $XDG_CONFIG_HOME/mr/available.d/ with configs for each
> >> of your fgits repos, following the templates in the new vcsh
> >> docs.  Make sure you have one for each chunk of your old
> >> ~/.mrconfig.
> > Make sure $XDG_CONFIG_HOME is set. If it's not, set it to
> > $HOME/.config
> 
> You should probably use $HOME/.config by default if $XDG_CONFIG_HOME
> is not set. I would usually add a line like this somewhere at the top
> of a script, to be sure it is set to something:
> 
> XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-$HOME/.config}
> 
> 
> From the XDG spec [1]:
> 
> "|$XDG_CONFIG_HOME| defines the base directory relative to which user
> specific configuration files should be stored. If |$XDG_CONFIG_HOME|
> is either not set or empty, a default equal to |$HOME|/.config should
> be used."
> 
> [1]
> http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html

exactly. scripts (and oneliners/commands) should use ${XDG_CONFIG_HOME:-$HOME/.config}
expecting this var to be set is a spec violation. (things would be simpler if the spec would dictate
that the var always needs to be set, but...)

Dieter



More information about the vcs-home mailing list