-
-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow customizing the location of TLDR_HOME
#49
Comments
Please make this happen! |
Hi there, I think it should be Backup systems will typically ignore the |
If this feature is ever implemented, this change should also be made to the shell completions in the |
Hi there! Was this finally implemented? I think the bot closed as stale (I don't see a related merge PR or similar). For anyone interested there's a very performant Rust implementation of tldr that implements Freedesktop.org XDG spec: |
as I pointed out here
|
Slight clarification on the above, |
My last comment was a solution was a fudge. Built in XDG support would be better, it still makes sense to have TLDR_CACHE_DIR if you want different from XDG. Depends how it's implemented or reimplemented. You could do the above allowing the user to rename the directory. I don't think having dot file naming convention for files or directories is helpful when already under a dot file or dot directory which XDG paths normally are. $XDG_CACHE_HOME = $HOME/.config $XDG_CACHE_HOME/tldrc/.tldrc/ As is $XDG_CACHE_HOME/.tldrc/ $XDG_CACHE_HOME/tldrc/ Don't you think? |
I agree and in fact would prefer to have more precise control or proper adherence to XDG (looking at my XDG dirs, In a sense I see three issues here:
These three together put you in an awkward position where you either have to set the var to |
I came across this issue while cleaning up my home directory earlier. It looks like it's still up for grabs so I'll start working on it soon. From my cursory inspection of the code, it seems like it'll be pretty easy to implement XDG compliance, but it'll require a tiny bit of refactoring to avoid the leading dot. I should have a PR later this week. I read through the discussion on tldr-pages/tldr#1065, and the consensus over there appears to be To maintain backwards compatibility, I'll check for a directory in this order:
|
I think If |
I just looked through the other TLDR clients and those that support XDG base directories overwhelmingly use |
Currently,
TLDR_HOME
is hard-coded insrc/tldr.h
to point to~/.tldrc
.It would be nice to configure this location via environment variables or a config file. I personally would prefer to set
TLDR_HOME
to$XDG_DATA_HOME/tldr
to comply with the XDG Base Directory Specification and keep my$HOME
clean.The text was updated successfully, but these errors were encountered: