twurl icon indicating copy to clipboard operation
twurl copied to clipboard

Set custom path for .twurlrc location

Open jmthackett opened this issue 12 years ago • 4 comments

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.

jmthackett avatar Mar 30 '12 15:03 jmthackett

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 avatar Apr 13 '12 18:04 sferik

Brilliant, thanks! :)

jmthackett avatar Apr 25 '12 11:04 jmthackett

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

tushdante avatar Oct 10 '16 20:10 tushdante

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...

smaeda-ks avatar Dec 16 '19 21:12 smaeda-ks