-
Notifications
You must be signed in to change notification settings - Fork 348
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
Terminal does not display command after go-prompt exit #228
Terminal does not display command after go-prompt exit #228
Comments
I noticed the same thing - I think it is due to the pkg/term upgrade in v0.2.6 - downgrading to v0.2.5 seems to avoid this issue. |
for those you have the same issue. I did a workaround with the following code func handleExit() {
rawModeOff := exec.Command("/bin/stty", "-raw", "echo")
rawModeOff.Stdin = os.Stdin
_ = rawModeOff.Run()
rawModeOff.Wait()
}
func main(){
defer handleExit()
....
} |
Confirm @nodauf's solution works nicely. I believe |
This bug is introduced by 20e0658. Saving a *unix.Termios and then modifying it in SetRaw() makes the saved state useless. By restoring saveTermios type from *unix.Termios to unix.Termios, SetRaw() no longer influences the saved termios. This should fix c-bata#228 and c-bata#233 . Signed-off-by: Xiami <[email protected]>
This bug is introduced by 20e0658. Saving a *unix.Termios and then modifying it in SetRaw() makes the saved state useless. By restoring saveTermios type from *unix.Termios to unix.Termios, SetRaw() no longer influences the saved termios. This should fix c-bata#228 and c-bata#233 . Signed-off-by: Xiami <[email protected]>
|
The patch adds a workaround for the bug "Terminal does not display command after go-prompt exit" (c-bata/go-prompt#228). Part of #15
The patch adds a workaround for the bug "Terminal does not display command after go-prompt exit" (c-bata/go-prompt#228). Part of #15
The patch adds a workaround for the bug "Terminal does not display command after go-prompt exit" (c-bata/go-prompt#228). Part of #15
The patch adds a workaround for the bug "Terminal does not display command after go-prompt exit" (c-bata/go-prompt#228). Part of #15
The patch adds a workaround for the bug "Terminal does not display command after go-prompt exit" (c-bata/go-prompt#228). Part of #15
The patch adds a workaround for the bug "Terminal does not display command after go-prompt exit" (c-bata/go-prompt#228). Part of #15
The patch adds a workaround for the bug "Terminal does not display command after go-prompt exit" (c-bata/go-prompt#228).
The patch adds a workaround for the bug "Terminal does not display command after go-prompt exit" (c-bata/go-prompt#228).
The patch adds a workaround for the bug "Terminal does not display command after go-prompt exit" (c-bata/go-prompt#228).
This happens because func getOriginalTermios(fd int) (unix.Termios, error) {
var err error
saveTermiosOnce.Do(func() {
saveTermiosFD = fd
saveTermios, err = termios.Tcgetattr(uintptr(fd))
})
return *saveTermios, err
}
|
Incidentally, the reason this broke in v0.2.6 is that this was the version that changed |
Fixed terminal brake after os.exit() in tt connect session. Have done it by adding workaround for the bug(c-bata/go-prompt#228) in case of executing os.exit(). Closes #425
Fixed terminal brake after os.exit() in tt connect session. Have done it by adding workaround for the bug(c-bata/go-prompt#228) in case of executing os.exit(). Closes #425
Fixed terminal brake after os.exit() in tt connect session. Have done it by adding workaround for the bug(c-bata/go-prompt#228) in case of executing os.exit(). Closes #425
Fixed terminal brake after os.exit() in tt connect session. Have done it by adding workaround for the bug(c-bata/go-prompt#228) in case of executing os.exit(). Closes #425
Fixed terminal brake after os.exit() in tt connect session. Have done it by adding workaround for the bug(c-bata/go-prompt#228) in case of executing os.exit(). Closes #425
Fixed terminal brake after os.exit() in tt connect session. Have done it by adding workaround for the bug(c-bata/go-prompt#228) in case of executing os.exit(). Closes #425
The patch workaround issue [c-bata/go-prompt#228], make the terminal running ts-cli works correctly after quit, exit, ControlC or ControlD. Signed-off-by: JUN JIE NAN <[email protected]>
The patch workaround issue [c-bata/go-prompt#228], make the terminal running ts-cli works correctly after quit, exit, ControlC or ControlD. Signed-off-by: JUN JIE NAN <[email protected]>
The patch workaround issue [c-bata/go-prompt#228], make the terminal running ts-cli works correctly after quit, exit, ControlC or ControlD. Signed-off-by: JUN JIE NAN <[email protected]>
Bug reports
After go-prompt exit the BASH doesn't show what I have inputed.
It's All ok when go-prompt doesn't been run.
input: date + enter
After go-prompt run, command
date
I have input missed.input: date + enter
command
reset
make terminal return normal.The text was updated successfully, but these errors were encountered: