Skip to content

A number of small configuration-related changes#163

Merged
guyfedwards merged 4 commits intoguyfedwards:masterfrom
larsks:feature/mostly-config-updates
Oct 9, 2025
Merged

A number of small configuration-related changes#163
guyfedwards merged 4 commits intoguyfedwards:masterfrom
larsks:feature/mostly-config-updates

Conversation

@larsks
Copy link
Copy Markdown
Contributor

@larsks larsks commented Oct 4, 2025

This pull request contains a number of minor updates, mostly centered around configuration handling:

  • fix: Prefer VISUAL over EDITOR
  • fix: Handle directory passed as --config-path
  • fix: Move default theme values to their own variable
  • fix: Make setupConfigDir function a method

The only real operational change is that now nom will attempt to correct for the case when you pass a directory as the argument to --config-path. This is an easy mistake to make when tab completion is involved.

@guyfedwards
Copy link
Copy Markdown
Owner

Got some conflicts @larsks, thanks

larsks added 4 commits October 8, 2025 10:53
By making `setupConfigDir` a method on `*Config`, we don't need to
recompute the config file path; we can just read it from `c.ConfigPath`.
Similarly, we can use `c.ConfigDir` rather than passing the directory in
as a parameter.
When the argument to `--config-path` is a directory, join the default config
file name to the directory name. That is, if you run:

    nom -c foo

Nom will act as if you actually ran:

    nom -c foo/config.yml
When looking for a full-featured editor in environment variables, it is
common to first check `$VISUAL` and then `$EDITOR`.
@larsks
Copy link
Copy Markdown
Contributor Author

larsks commented Oct 8, 2025

I've resolve the conflicts. Cheers!

@guyfedwards guyfedwards merged commit 5de9cb8 into guyfedwards:master Oct 9, 2025
2 checks passed
@guyfedwards
Copy link
Copy Markdown
Owner

guyfedwards commented Oct 9, 2025

released in v2.17.0, thanks @larsks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants