Discussion:
Conditional config file
Paul van der Walt
2011-11-10 19:32:39 UTC
Permalink
Dear cmus devs,

Strange question maybe, but since I've got my dotfiles in a
git repository (quite the fashion these days I'm told), I'd like
to be able to do a conditional in my config files. In mutt I use
a line like the following:

source ~/.mutt-`test -e ~/.mutt-$(hostname -s) && echo $(hostname -s) || echo global`

Although the same doesn't seem possible with cmus, since it
doesn't seem to evaluate things in backticks. Is there a method
you guys know of, or should I try to hack it in?

Cheers
Paul
Jason Woofenden
2011-11-11 00:28:29 UTC
Permalink
I sync many of my dotfiles between desktop, laptop and backup with
git too.

I don't use cmus much on my laptop, so hadn't gotten around to
doing anything about this.

How about putting this in your ~/.profile ?

export CMUS_HOME="$HOME/.cmus-`hostname -s`"

I'm going to give that a try.

- Jason

Loading...