plerd icon indicating copy to clipboard operation
plerd copied to clipboard

PLERD_HOME could be an environment variable

Open taskboy3000 opened this issue 5 years ago • 0 comments

Inspired from Perl, Java, et al, plerd could have a notion of a home directory which it can at least find the conf file. That way, the following "just works":

$ plerdall --init (accept defaults) $ export PLERD_HOME=$HOME/plerd $ plerdall # any action

This can be implemented like:

if (!defined $config_file && exists $ENV{PLERD_HOME}) { $config_file = "$ENV{PLERD_HOME}/conf/plerd.conf"; }

Given that maybe only the config file lives there, the better option might be to have the default config file be $HOME/.plerd.conf?

That implementation is slicker:

if (!defined $config_file && -e "$ENV{HOME}/.plerd.conf") { $config_file = "$ENV{HOME}/.plerd.conf"; }

Something to ponder.

Whatever you decide, after a user runs plerdall, I would suggest that plerdall should just work if all defaults were accepted.

taskboy3000 avatar Jun 16 '20 17:06 taskboy3000