tftarget
tftarget copied to clipboard
Ctrl+C does not reset terminal properly
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.
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
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