Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Request] Make the local settings dir(s) configurable? #10

Open
absolutejam opened this issue Mar 23, 2019 · 3 comments
Open

[Request] Make the local settings dir(s) configurable? #10

absolutejam opened this issue Mar 23, 2019 · 3 comments

Comments

@absolutejam
Copy link

Hey, great work on this version of a tldr client 馃憤

I've recently started using tldr quite a lot, but I also have my own collection of markdown snippets which I've typically accessed via. vim in the past. It would be really be nice if I could consolidate them into tldr.

Is there any possibility of either a way to override the config directory and/or add another directory to index, so tldr could scan both the canonical resource and my own folder(s)? That way I could use my own snippets - some of which can't be contributed upstream to tldr - using the same tool.

For example, functionality like the following to override and use only my own resources, would be awesome.

# Override the man dir and only use my custom snippets
tldr --man-dir ~/.tldr git
# or add my own snippets on top of the normal tldr snippets
tldr --additional-dir ~/.tldr git

Cheers,
James.

@absolutejam absolutejam changed the title Would it be possible to make the local settings dir(s) configurable? [Request] Make the local settings dir(s) configurable? Mar 23, 2019
@isacikgoz
Copy link
Owner

Hey @absolutejam , thanks for the feedback I totally miss your suggestion. Sorry for the late reply. Current implementation regularly checks a single git repository which is tldr-pages official repo. I guess your current suggestion will add a little bit complexity to the code. That is what I try to avoid. However, I am thinking a workaround; you can manually add those files to the repo and if they won't conflict with repo files, it will work as you expected.

Still, this issue can stay opened so that we can hear others thoughts.

@Plloi
Copy link

Plloi commented Sep 17, 2019

for a simple workaround maybe make the upstream repo configurable. then the user could make/add their own snippets, but it would be on them to maintain sync with tldr master.
--This is already kinda doable, after first sync replace the repo's origin with desired target, this should hold until clear-cache is fun.

i've got half an idea for managing multiple data dirs while (hopefully) keeping complexity down i might play with.

@josefwells
Copy link

I would like something like this (but maybe depend on an ENV variable to set the location for the clone) This would cover the original-bug intent (TLDR_DATA=/personal tldr special_command vs. TLDR_DATA=/global tldr regular_command)

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

No branches or pull requests

4 participants