-
Notifications
You must be signed in to change notification settings - Fork 24
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
Respect $TR_AUTH like cli tool transmission-remote #34
Comments
Sure, shouldn't be a problem. But I would implement it as a setting, not as a CLI option. So you would have `set srv.authenv true` or something similar in your config file.
|
Sounds great, even better than what official |
@doronbehar, I currently don't see the real benefit of reading $TR_AUTH. Why |
Well first of all, I think that having a password in plain text in a configuration file is a bad habit. The way I set |
Ok, thanks for reminding me.
I think I'll stick with reading the env var. It's faster, easier to implement
and avoids subprocesses. But feel free to try and convince me otherwise.
|
Haha, I liked that :) Reading the environmental variable is a great start but as for having an option like
|
Thanks for the examples. I like the vdirsyncer approach where adding '.fetch' to
a setting's name turns the value into a command. Maybe I can implement that
somewhat elegantly.
On the other hand, in your case, this wouldn't be as nice as adding a new
setting because the password is part of the URL. You would have to get the
password in a subshell, somehow insert it into the URL string, and `echo`
that. Yuck. And I'm not even sure it would be useful for anything other
settings.
|
What you said Yuck about is exactly what I'm doing in the |
Not exactly, because you're inside an interpreter in your `.zsh_credentials`.
The stig rc line would look something like this:
`set srv.url:fetch 'sh -c "echo \"user:$(pass transmission)@host:port\""'`
... and I probably got the quotes/escapes wrong. It would be little neater if the
command would be passed to /bin/sh, but still not as elegant as your env vars.
|
Oh now I understand, you were thinking of something similar to what they do in Maybe you should enable splitting the |
I originally decided against that to keep the list of settings small, but maybe
that would be best. It would solve this issue elegantly and also issue #24 ('/'
character in password).
It would break backwards compatibility again, but luckily we're still in alpha
stage so nobody can complain! :)
|
You are funny :), I don't think It has to brake backwards compatibility, it might be possible to specify in the manual or something that I'll agree with either of those choices :) |
Yeah, no, having two separate (sets of) settings for the same thing is
definitely not going to happen. That's just asking for bugs and confused users.
But thanks for your input. It's very much appreciated.
|
Thanks for you reaching out your users 👍, Hope to see it in the next version. |
I've extended the 'set' command so that you can now append ':eval' to the name
|
Works great! Thanks! |
Sorry for necrobumping but I wanted to share that this makes it possible to use env vars in the config 👍
|
how do i set username? |
The official tool by the transmission team,
transmission-remote
, accepts an option-ne
(or--authenv
) which reads$TR_AUTH
and gets authentication info from this environmental variable.Could it be implemented in
stig
? That will enable me to remove the wrapper script I have in my dotfiles repository.The text was updated successfully, but these errors were encountered: