mirror of
https://github.com/tw93/Mole.git
synced 2026-02-08 01:34:21 +00:00
🎨 Better analysis experience
This commit is contained in:
@@ -114,6 +114,7 @@ read_key() {
|
||||
'd'|'D') echo "DELETE" ;;
|
||||
'r'|'R') echo "RETRY" ;;
|
||||
'?') echo "HELP" ;;
|
||||
$'\x03') echo "QUIT" ;; # Ctrl+C
|
||||
$'\x7f'|$'\x08') echo "DELETE" ;; # Delete key (labeled "delete" on Mac, actually backspace)
|
||||
$'\x1b')
|
||||
# ESC sequence - could be arrow key, delete key, or ESC alone
|
||||
|
||||
@@ -48,10 +48,18 @@ paginated_multi_select() {
|
||||
stty echo icanon 2>/dev/null || true
|
||||
leave_alt_screen
|
||||
}
|
||||
trap cleanup EXIT INT TERM
|
||||
|
||||
# Setup terminal
|
||||
stty -echo -icanon 2>/dev/null || true
|
||||
# Interrupt handler
|
||||
handle_interrupt() {
|
||||
cleanup
|
||||
exit 130 # Standard exit code for Ctrl+C
|
||||
}
|
||||
|
||||
trap cleanup EXIT
|
||||
trap handle_interrupt INT TERM
|
||||
|
||||
# Setup terminal - preserve interrupt character
|
||||
stty -echo -icanon intr ^C 2>/dev/null || true
|
||||
enter_alt_screen
|
||||
hide_cursor
|
||||
|
||||
|
||||
Reference in New Issue
Block a user