-
Notifications
You must be signed in to change notification settings - Fork 99
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
Any tips to get it running on windows 10? #12
Comments
Just pushed a new release, please try the 1.3.0 and tell me if it's better. |
Issue persists unfortunately. Here's the output of
It hangs after the last line, and needs |
I'm noticing the same thing. I'm on a recent Windows 10 release on a Virtual Machine (virtualbox). The built-in |
If we remove This is possibly a bug that should be filed with that package against Windows. diff --git a/main.go b/main.go
index c3746cf..9f62d13 100644
--- a/main.go
+++ b/main.go
@@ -12,7 +12,6 @@ import (
"github.com/rs/curlie/args"
"github.com/rs/curlie/formatter"
- "golang.org/x/crypto/ssh/terminal"
)
func main() {
@@ -52,7 +51,7 @@ func main() {
stdout = &formatter.HelpAdapter{Out: stdout, CmdName: os.Args[0]}
} else {
isForm := opts.Has("F")
- if pretty || terminal.IsTerminal(1) {
+ if pretty || true /*|| terminal.IsTerminal(1)*/ {
inputWriter = &formatter.JSON{
stdout = &formatter.BinaryFilter{Out: stdout}
}
- if pretty || terminal.IsTerminal(2) {
+ if pretty || true /*|| terminal.IsTerminal(2) */ {
// If stderr is not redirected, output headers.
if !quiet {
opts = append(opts, "-v")
@@ -80,7 +79,7 @@ func main() {
// If data is provided via -d, read it from there for the verbose mode.
// XXX handle the @filename case.
inputWriter.Write([]byte(data))
- } else if !terminal.IsTerminal(0) {
+ } else if false /*!terminal.IsTerminal(0)*/ {
// If something is piped in to the command, tell curl to use it as input.
opts = append(opts, "-d@-")
// Tee the stdin to the buffer used show the posted data in verbose mode.
@@ -118,7 +117,7 @@ func main() {
Verbose: verbose,
Post: input,
}
- if (opts.Has("I") || opts.Has("head")) && terminal.IsTerminal(1) {
+ if (opts.Has("I") || opts.Has("head")) && true /* terminal.IsTerminal(1) */ {
cmd.Stdout = ioutil.Discard
}
status := 0 I'd like to propose creating a dummy check for when compiling for Windows. I'd be happy to submit that PR. Thoughts @rs? |
Ok |
My conclusion from testing is that it is not possible to detect the Terminal properly on Windows 10 through the
Windows Terminal, unfortunately, is not detected as a proper console, despite behaving as one. cc/ @jkunkee Re: Windows Terminal: Do you know anyone that could help with this? |
UpdateSimple Fix: Use proper, system-specific file descriptors. See #28. |
Hi. One of Microsoft's Terminal/Console PMs here. Windows' (legacy) Console has supported a pretty decent range of VT sequences since 2017. The new Windows Terminal much more comprehensive support for VT, and is updated ~monthly. If Curlie doesn't enable VT mode, and/or emits VT sequences or Unicode glyphs that Console doesn't support, you may see some garbage and/or Unicode placeholder symbols (�). Curlie should enable Console's VT Processing mode when starting up by grabbing the handle for STDOUT, and calling If you want to emit Unicode glyphs, you'll need to use the wide char output variants. Again, here's how Curl does it. FWIW, I am knocking together a small command-line tool ("Paws") that supports VT for colorized output (if available), and monochrome if not. HTH. |
Thanks @bitcrazed! That cleared up some of my misconceptions. I'm glad to hear that Console (default cmd.exe) supports colors after all. Opening up a new issue #29 to deal specifically with the color issue now that we've got the basic Stdout problem solved that was the root of this original issue. |
Glad to have helped. If you're interested in the history and internals of Console & Windows' command-line, please read through this 5-part blog series. In this series, you'll find, for example, that like Bash, Cmd and PowerShell are simply command-line shells, but that Windows "helps" by creating and attaching a Console instance to them, providing the (now somewhat dated) UI through which you interact with the shells. Also, note that Console is now largely in maintenance - it'll likely be shipped in Windows for years to come, and may pick up a few improvements here and there, but all new development & new features are being poured into Windows Terminal which I STRONGLY encourage you to use if possible, if you're not already. |
Downloaded the amd64 binary, and have a working curl in path, but
curlie http://site.tld
just hangs indefinitely.The text was updated successfully, but these errors were encountered: