Code Monkey home page Code Monkey logo

Comments (18)

rndusr avatar rndusr commented on August 18, 2024

from stig.

doronbehar avatar doronbehar commented on August 18, 2024

Sounds great, even better than what official transmission-remote offers :)

from stig.

rndusr avatar rndusr commented on August 18, 2024

@doronbehar, I currently don't see the real benefit of reading $TR_AUTH. Why
don't put set srv.url user:password@host:port in your rc file?

from stig.

doronbehar avatar doronbehar commented on August 18, 2024

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 $TR_AUTH in my shell configuration files for transmission-remote is using pass just like this. I think it's much better than storing the password in the configuration file.
Another great solution would be to have something like srv.password_eval = pass transmission useful for people who use password managers like pass or gnome-keyring.

from stig.

rndusr avatar rndusr commented on August 18, 2024

from stig.

doronbehar avatar doronbehar commented on August 18, 2024

Haha, I liked that :)

Reading the environmental variable is a great start but as for having an option like password_eval just like in this programs:

from stig.

rndusr avatar rndusr commented on August 18, 2024

from stig.

doronbehar avatar doronbehar commented on August 18, 2024

What you said Yuck about is exactly what I'm doing in the .zsh_credentials file in my dotfiles repository.

from stig.

rndusr avatar rndusr commented on August 18, 2024

from stig.

doronbehar avatar doronbehar commented on August 18, 2024

Oh now I understand, you were thinking of something similar to what they do in muttrc (as explained here: https://unix.stackexchange.com/a/20572).

Maybe you should enable splitting the srv.url into srv.host, srv.port, srv.user and optionally srv.password which could be interpreted with something similar to fetch. Then you won't have to worry to much about sub-shells and quotes, you could just make the fetch command by default interpreting a shell command. That's only one sub-shell if I'm correct.

from stig.

rndusr avatar rndusr commented on August 18, 2024

from stig.

doronbehar avatar doronbehar commented on August 18, 2024

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 srv.url is overriding srv.host, srv.port, srv.user and srv.password or the other way around but than you will still have to solve #24 elegantly. I guess it will be much easier for you to remove the srv.url and use only the above variables instead exactly as you said.

I'll agree with either of those choices :)

from stig.

rndusr avatar rndusr commented on August 18, 2024

from stig.

doronbehar avatar doronbehar commented on August 18, 2024

Thanks for you reaching out your users 👍, Hope to see it in the next version.
Cheers!

from stig.

rndusr avatar rndusr commented on August 18, 2024

I've extended the 'set' command so that you can now append ':eval' to the name
of a setting to indicate that the value is a command:

set connect.password:eval pass transmission

from stig.

doronbehar avatar doronbehar commented on August 18, 2024

Works great! Thanks!

from stig.

pschmitt avatar pschmitt commented on August 18, 2024

Sorry for necrobumping but I wanted to share that this makes it possible to use env vars in the config 👍

set tui.theme:eval echo $XDG_CONFIG_HOME/stig/themes/stig_darker_theme.txt

from stig.

ralyodio avatar ralyodio commented on August 18, 2024

how do i set username?

from stig.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.