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

Ctrl+C does not reset terminal properly #14

Open
msmuenchen opened this issue May 31, 2023 · 2 comments
Open

Ctrl+C does not reset terminal properly #14

msmuenchen opened this issue May 31, 2023 · 2 comments
Assignees

Comments

@msmuenchen
Copy link

When running under bash (tested version: Macports, 5.2.15(1)-release), a Ctrl+C interruption exits tftarget, but that doesn't reset the terminal config which leads to the cursor vanishing.

@gitmpr
Copy link

gitmpr commented Jul 9, 2024

cursor also vanished after running tftarget apply and getting errors. something similar like this should be implemented. This example is bash though and the application is in golang, so it has to be ported

showcursor() {
  echo -en "\033[?25h"
}

hidecursor() {
  echo -en "\033[?25l"
}

# Trap the EXIT signal to ensure cursor is restored before exiting
trap showcursor EXIT

@orangekame3
Copy link
Collaborator

Sorry for not being able to respond for a long time, and thank you for using and providing feedback on tftarget. This behavior stems from the packages that tftarget is using. It seems like I will have more time to dedicate to tftarget again, so I will consider addressing this issue.

https://github.com/AlecAivazis/survey#why-isnt-ctrl-c-working

@orangekame3 orangekame3 self-assigned this Jul 9, 2024
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