tftarget icon indicating copy to clipboard operation
tftarget copied to clipboard

Ctrl+C does not reset terminal properly

Open msmuenchen opened this issue 1 year ago • 2 comments

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.

msmuenchen avatar May 31 '23 17:05 msmuenchen

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

gitmpr avatar Jul 09 '24 13:07 gitmpr

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 avatar Jul 09 '24 14:07 orangekame3