Comments (3)
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.
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.
Not a problem, that you for the suggestion.
from clikt.
Related Issues (20)
- Support observer for child commands run call HOT 2
- error when running in a docker container HOT 1
- Replacement for `FlagOption` HOT 2
- Feature request: add a WASM target HOT 1
- Feature Request: Allow OptionGroups to be nested HOT 1
- Default values for path options are not checked HOT 1
- Type mismatch: inferred type is MordantHelpFormatter but ((Context) -> HelpFormatter)? was expected HOT 2
- Segmentation fault with release executable HOT 8
- Testing commands after parsing option but before running HOT 8
- `CliktCommandTestResult.stdout` seems to miss some lines HOT 5
- `CliktCommandTestResult.stdout` explands tabs to spaces HOT 3
- Use composition over inheritance HOT 4
- JsonValueSource returns with double quotes HOT 1
- Load from config HOT 3
- option() should infer valueSourceKey HOT 4
- Documentation is incorrect? HOT 2
- Autocomplete: add Powershell support HOT 2
- Flag options from Env var defaulting false via context HOT 1
- Options and arguments broken in 4.2.1 HOT 2
- Clikt 4.2.1 does not work for me when building native images HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clikt.