1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-04 17:24:45 +00:00

Grammar check and optimization

This commit is contained in:
Tw93
2025-12-02 17:02:14 +08:00
parent bb50a345b6
commit 443b59d9c7
14 changed files with 41 additions and 28 deletions

View File

@@ -129,7 +129,7 @@ paginated_multi_select() {
for ((i = 0; i < len; i++)); do
c="${s:i:1}"
case "$c" in
'\' | '*' | '?' | '[' | ']') out+="\\$c" ;;
$'\\' | '*' | '?' | '[' | ']') out+="\\$c" ;;
*) out+="$c" ;;
esac
done
@@ -196,6 +196,7 @@ paginated_multi_select() {
}
# Interrupt handler
# shellcheck disable=SC2329
handle_interrupt() {
cleanup
exit 130 # Standard exit code for Ctrl+C
@@ -216,6 +217,7 @@ paginated_multi_select() {
hide_cursor
# Helper functions
# shellcheck disable=SC2329
print_line() { printf "\r\033[2K%s\n" "$1" >&2; }
# Print footer lines wrapping only at separators

View File

@@ -109,6 +109,7 @@ paginated_multi_select() {
}
# Interrupt handler
# shellcheck disable=SC2329
handle_interrupt() {
cleanup
exit 130 # Standard exit code for Ctrl+C
@@ -129,6 +130,7 @@ paginated_multi_select() {
hide_cursor
# Helper functions
# shellcheck disable=SC2329
print_line() { printf "\r\033[2K%s\n" "$1" >&2; }
render_item() {