Skip to content

feat: add LNK_HOME env var for custom repository location#38

Merged
yarlson merged 1 commit intomainfrom
feat/lnk-home-env
Feb 28, 2026
Merged

feat: add LNK_HOME env var for custom repository location#38
yarlson merged 1 commit intomainfrom
feat/lnk-home-env

Conversation

@yarlson
Copy link
Owner

@yarlson yarlson commented Feb 28, 2026

Summary

  • Adds LNK_HOME environment variable support to override the default repository path
  • Priority order: LNK_HOME > XDG_CONFIG_HOME/lnk > ~/.config/lnk
  • Updates lnk init to display the actual repo path instead of hardcoded ~/.config/lnk
  • Adds DisplayPath() helper to show ~-relative paths

Closes #26

Test plan

  • Added test case verifying LNK_HOME takes priority over XDG_CONFIG_HOME
  • Updated existing tests to clear LNK_HOME to prevent interference
  • Full test suite passes locally

Allows users to override the default ~/.config/lnk path by setting
LNK_HOME. Priority: LNK_HOME > XDG_CONFIG_HOME/lnk > ~/.config/lnk.

Closes #26
@yarlson yarlson merged commit 37a2184 into main Feb 28, 2026
7 checks passed
@yarlson yarlson deleted the feat/lnk-home-env branch February 28, 2026 17:32
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.

Feature request: custom location

1 participant