Skip to content
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

Optional Keyboard shortcut and menu item for closing Standard In #465

Closed
libliflin opened this issue Dec 13, 2015 · 13 comments
Closed

Optional Keyboard shortcut and menu item for closing Standard In #465

libliflin opened this issue Dec 13, 2015 · 13 comments

Comments

@libliflin
Copy link

Hi!

After trying to copy some Go code from a book and wondering what is wrong, I've been reading about a few different problems people have with EOF in windows here, here, here, here, here, and here.

If I squint really hard I can see a potential for ConEmu to close it's child's stdin somehow in code, thus optionally making it kinda sorta like bash's Ctrl+D.

Is this possible?

@Maximus5
Copy link
Owner

I'm lost. What's the problem?

@Maximus5
Copy link
Owner

/cc @techtonik does that relates to your Go question?

@techtonik
Copy link

Yes. I believe it is related. The problem is that Go programs do not process Ctrl-D and Ctrl-Z input. I don't think that ConEmu should process it, because different programs may have different purposes for that keybinding.

@Maximus5
Copy link
Owner

Sample Go program?

@techtonik
Copy link

package main

import "fmt"

func main() {
    fmt.Print("Enter text: ")
    var input string
    fmt.Scanln(&input)
    fmt.Print(input)
}

From https://stackoverflow.com/questions/20895552/how-to-read-input-from-console-line

@Maximus5
Copy link
Owner

I don't see any problems with example. It reads one line at a time. Enter stops reading, no additional keypresses (like Ctrl-Z) are required.

@techtonik
Copy link

It is just a code to read from input to start from.

@libliflin
Copy link
Author

Hi, No problem, just a feature request. And I don't think this should be part of standard ConEmu. I just think it would be nice for conemu to offer a menu option to close the child's stdin (with the possiblity for a user to bind it to a key binding if they choose)

@Maximus5
Copy link
Owner

@libliflin Unless anyone provides Go example where this feature is required or even helpful - I can't do any test.
Also, I consider this proposal as harmful, because this feature may break further execution of your app.

@libliflin
Copy link
Author

The specific code that did not work for me was https://github.com/adonovan/gopl.io/blob/master/ch1/dup2/main.go

@Maximus5
Copy link
Owner

4b4a466

@techtonik
Copy link

Go issue golang/go#6303

@Maximus5
Copy link
Owner

OK, 364a769

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants