Closed erhhung closed 7 months ago
Thanks for this issue. I just learned about $XDG_CONFIG_HOME
and the related standard. I'll make the updates to use that standard (see #471 ). I'll keep this issue for the specific enhancement of passing --config-dir to the --config option.
Describe the bug
If I explicitly specify an existing config file to update using the
--config-path
option while also specifying--config
to perform a guided configuration, Harlequin should not prompt me for the config file name—it should just print the--config-path
value after confirming that it exists and can be read.Also, if I run
harlequin --config
without--config-path
, then it should look for an existing config file in the standard search paths and display that as the default response to the first prompt (user can still change it). If no existing config file exists in the search paths, then show.harlequin.toml
as the default.Standard config file search paths should be in this order:
./.harlequin.toml
(current directory)$XDG_CONFIG_HOME/harlequin/config.toml
(could also be named "harlequin.toml
")~/.config/harlequin/config.toml
(could also be named "harlequin.toml
")~/.harlequin.toml
(current standard)To Reproduce
Actual behavior
harlequin --config
forces me, in its first prompt, to enter the full path to the config file I want to update, despite I having already specified that path in--config-path
so that I can leverage my shell's glob expansion and variable substitution capabilities (e.g.~/
and$XDG_CONFIG_HOME
).Additional context
Can you tell us more about your system?