Giter VIP home page Giter VIP logo

Comments (3)

ajalt avatar ajalt commented on June 5, 2024

If I understand you correctly, it sounds like you want to throw away most Clikt output, but still have interactive prompt.

I don't think that makes sense semantically, but Clikt is a pragmatic library, so if it's useful in practice, I would consider adding it.

Unfortunatley, it's not possible to implement you use case. The only mechanism the JVM provides for detecting whether you have an interactive console is to check if System.console() is null, and it is null if any stream is redirected. So if you pipe stdout or stdin somewhere, the JVM acts like stderr is also redirected. So you wouldn't be able to interact with it anyway.

from clikt.

gschjetne avatar gschjetne commented on June 5, 2024

Interesting, I didn't know that. I suppose it might be a portability tradeoff.

I did some looking around to see how other programs would prompt for passwords. Seems like programs like SSH access the TTY directly instead, bypassing any redirection. But I suppose that would be well out of the scope of Clikt.

But thanks for hearing me out, I learned something today. And of course, thanks for the library!

from clikt.

ajalt avatar ajalt commented on June 5, 2024

Not a problem, that you for the suggestion.

from clikt.

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.