1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-12 01:49:00 +00:00

chore: auto format code

This commit is contained in:
Tw93
2026-01-13 02:45:33 +00:00
parent 6b594c7d69
commit 3c8c2b3b98
2 changed files with 21 additions and 21 deletions

View File

@@ -106,7 +106,7 @@ perform_purge() {
fi fi
# Calculate how much to show on each side # Calculate how much to show on each side
local side_len=$(( (max_len - 3) / 2 )) local side_len=$(((max_len - 3) / 2))
local start="${path:0:$side_len}" local start="${path:0:$side_len}"
local end="${path: -$side_len}" local end="${path: -$side_len}"
echo "${start}...${end}" echo "${start}...${end}"
@@ -126,7 +126,7 @@ perform_purge() {
# Get current spinner character # Get current spinner character
local spin_char="${spinner_chars:$spinner_idx:1}" local spin_char="${spinner_chars:$spinner_idx:1}"
spinner_idx=$(( (spinner_idx + 1) % ${#spinner_chars} )) spinner_idx=$(((spinner_idx + 1) % ${#spinner_chars}))
# Show title on first line, spinner and scanning info on second line # Show title on first line, spinner and scanning info on second line
if [[ -n "$display_path" ]]; then if [[ -n "$display_path" ]]; then

View File

@@ -642,7 +642,7 @@ paginated_multi_select() {
[[ $end_idx -ge $visible_total ]] && end_idx=$((visible_total - 1)) [[ $end_idx -ge $visible_total ]] && end_idx=$((visible_total - 1))
for ((i = start_idx; i <= end_idx; i++)); do for ((i = start_idx; i <= end_idx; i++)); do
local row=$((i - start_idx + 3)) # +3 for header local row=$((i - start_idx + 3)) # +3 for header
printf "\033[%d;1H" "$row" >&2 printf "\033[%d;1H" "$row" >&2
local is_current=false local is_current=false
[[ $((i - start_idx)) -eq $cursor_pos ]] && is_current=true [[ $((i - start_idx)) -eq $cursor_pos ]] && is_current=true
@@ -704,7 +704,7 @@ paginated_multi_select() {
[[ $end_idx -ge $visible_total ]] && end_idx=$((visible_total - 1)) [[ $end_idx -ge $visible_total ]] && end_idx=$((visible_total - 1))
for ((i = start_idx; i <= end_idx; i++)); do for ((i = start_idx; i <= end_idx; i++)); do
local row=$((i - start_idx + 3)) # +3 for header local row=$((i - start_idx + 3)) # +3 for header
printf "\033[%d;1H" "$row" >&2 printf "\033[%d;1H" "$row" >&2
local is_current=false local is_current=false
[[ $((i - start_idx)) -eq $cursor_pos ]] && is_current=true [[ $((i - start_idx)) -eq $cursor_pos ]] && is_current=true