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

[Bug] Terminal Colors not reset after application exists #265

Open
mattdesmarais opened this issue Oct 17, 2022 · 2 comments
Open

[Bug] Terminal Colors not reset after application exists #265

mattdesmarais opened this issue Oct 17, 2022 · 2 comments
Labels

Comments

@mattdesmarais
Copy link

Bug reports

Please file a bug report here.

Expected Behavior

When go-prompt application is terminated (ctrl^D), terminal color's need to be reset.

Current Behavior and Steps to Reproduce

After exiting go-prompt application (ex: simple-echo), the terminal & shell (mac terminal, iterm2, ubuntu bash) are in a state where you cannot see any characters being typed. Restarting the shell resolved the issue, until the next time you run the go-prompt application:

`vagrant@dev:~/host_user_homedir/go-workspace/src/go-prompt/_example/simple-echo$ go run main.go

users
Your input: users
vagrant@dev:~/host_user_homedir/go-workspace/src/go-prompt/_example/simple-echo$ ddddddd: command not found
`

go-prompt-terminal.mov

Context

Mac 11.7 with iTerm2 and terminal
Ubuntu 20.04 with default bash shell

@mattdesmarais
Copy link
Author

This looks like a dup of #228

@fasnow
Copy link

fasnow commented Jul 4, 2023

image
或者在程序执行os.Exit()前执行
cmd := exec.Command("reset")
err := cmd.Run()

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

No branches or pull requests

2 participants