detached 62c7657

feat(ux): handle Ctrl+C gracefully instead of showing error

commit
62c7657290b4359a5e8ab68d564c79e43573478d
author
bnema · · 2025-10-20 17:08 UTC
committer
bnema · · 2025-10-20 20:54 UTC
parent
79d696d
signature
unsigned
2 files · +8 -0
M CHANGELOG.md +1 -0
@@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file.
77 ### Changed
88 - **README**: Added ArchUp logo and refined project description for clarity
99 - **Kernel selection**: Simplified AMD P-State mode descriptions for better user clarity
10+- **User interrupts**: Ctrl+C now shows clean cancellation message instead of error screen
1011
1112 ### Fixed
1213 - **Limine bootloader**: Fixed kernel panic with non-default kernels (cachyos, zen, lts)
@@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file.
7 ### Changed7 ### Changed
8 - **README**: Added ArchUp logo and refined project description for clarity8 - **README**: Added ArchUp logo and refined project description for clarity
9 - **Kernel selection**: Simplified AMD P-State mode descriptions for better user clarity9 - **Kernel selection**: Simplified AMD P-State mode descriptions for better user clarity
10+- **User interrupts**: Ctrl+C now shows clean cancellation message instead of error screen
10 11
11 ### Fixed12 ### Fixed
12 - **Limine bootloader**: Fixed kernel panic with non-default kernels (cachyos, zen, lts)13 - **Limine bootloader**: Fixed kernel panic with non-default kernels (cachyos, zen, lts)
M install/helpers/errors.sh +7 -0
@@ -80,6 +80,13 @@ catch_errors() {
8080 local failed_command="${BASH_COMMAND}"
8181 local failed_script="${CURRENT_SCRIPT:-}"
8282
83+ # Exit code 130 means user pressed Ctrl+C - handle gracefully
84+ if [[ $exit_code -eq 130 ]]; then
85+ ERROR_HANDLING=false
86+ interrupt_handler
87+ return
88+ fi
89+
8390 # Log error to file IMMEDIATELY with direct file write
8491 # This must happen before any stdout/stderr restoration
8592 {
@@ -80,6 +80,13 @@ catch_errors() {
80 local failed_command="${BASH_COMMAND}"80 local failed_command="${BASH_COMMAND}"
81 local failed_script="${CURRENT_SCRIPT:-}"81 local failed_script="${CURRENT_SCRIPT:-}"
82 82
83+ # Exit code 130 means user pressed Ctrl+C - handle gracefully
84+ if [[ $exit_code -eq 130 ]]; then
85+ ERROR_HANDLING=false
86+ interrupt_handler
87+ return
88+ fi
89+
83 # Log error to file IMMEDIATELY with direct file write90 # Log error to file IMMEDIATELY with direct file write
84 # This must happen before any stdout/stderr restoration91 # This must happen before any stdout/stderr restoration
85 {92 {

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 0

    ↑↓ moveenter openesc close