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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set custom path for .twurlrc location #19

Open
jmthackett opened this issue Mar 30, 2012 · 4 comments
Open

Set custom path for .twurlrc location #19

jmthackett opened this issue Mar 30, 2012 · 4 comments

Comments

@jmthackett
Copy link

I was wondering if it'd be possible for one of you to add an argument to twurl that lets you specify your .twurlrc directory? I'd do it myself but I'm not really a ruby guy... I found my way around well enough to hard-code in where I needed it to look though, so not exactly urgent, but I think it'd be cool and if either of you agree and have the time it'd be really good.

Something like -P /home/user/.twurlrc would be super.

Note: the reason for this request is that I'm calling twurl from another service that strips out all ENV stuff, including location of homedir.

@sferik
Copy link
Contributor

sferik commented Apr 13, 2012

I had a few minutes to work on this. I added an --rcfile option to cli.rb (plus tests) in the custom_rcfile branch, but this option is not being passed into the RCFile class. This will require a bit of refactoring, since the class exposes a directory= method but not file_path=. I didn't have time to do the refactoring, but I thought I'd push my progress in case someone else wants to move it forward.

sferik added a commit that referenced this issue Apr 13, 2012
TODO: Connect option to RCFile class to set custom file path. (#19)
@jmthackett
Copy link
Author

Brilliant, thanks! :)

@tushdante
Copy link

hey @sferik has there been any updates on this? we've got another user asking for this feature

@smaeda-ks
Copy link
Collaborator

Though, the problem is, how twurl can remember a custom .twurlrc file location if we allow to create it somewhere else? For me, it likely needs to have another config file just to store a custom file location path, doesn't it? So it's not really solving the fundamental issue.

Or, are you saying, you're willing to specify a custom file path via a new option but for every command? I don't think that's ideal...

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

No branches or pull requests

5 participants