Skip to content

Commit 52961eb

Browse files
committed
[Change] Scan list: show full paths, consistent 1-space indent
[Change] Remove 30-char path truncation from -e list scan history display; paths now render in full across all three session passes (index, TSV, legacy) [Fix] Active scan section indentation reduced from 2-space to 1-space to match scan history alignment
1 parent da310b5 commit 52961eb

2 files changed

Lines changed: 9 additions & 23 deletions

File tree

files/internals/lmd_lifecycle.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -302,10 +302,10 @@ _lifecycle_render_text_active() {
302302

303303
printf 'Active scans (%s):\n' "$_count"
304304
if [ "$_verbose" = "1" ]; then
305-
printf ' %-22s %-10s %-7s %-8s %-10s %-6s %-10s %-10s %-8s %-12s %-12s %s\n' \
305+
printf ' %-22s %-10s %-7s %-8s %-10s %-6s %-10s %-10s %-8s %-12s %-12s %s\n' \
306306
"SCANID" "STATE" "PID" "ENGINE" "FILES" "HITS" "ELAPSED" "ETA" "WORKERS" "SIG_VER" "PROGRESS" "PATH"
307307
else
308-
printf ' %-22s %-10s %-7s %-8s %-10s %-6s %-10s %-10s %s\n' \
308+
printf ' %-22s %-10s %-7s %-8s %-10s %-6s %-10s %-10s %s\n' \
309309
"SCANID" "STATE" "PID" "ENGINE" "FILES" "HITS" "ELAPSED" "ETA" "PATH"
310310
fi
311311

@@ -346,13 +346,13 @@ _lifecycle_render_text_active() {
346346
if [ "$_pos" -gt 0 ] && [ "$_tot" -gt 0 ]; then
347347
_progress_str="${_pos}/${_tot}"
348348
fi
349-
printf ' %-22s %-10s %-7s %-8s %-10s %-6s %-10s %-10s %-8s %-12s %-12s %s\n' \
349+
printf ' %-22s %-10s %-7s %-8s %-10s %-6s %-10s %-10s %-8s %-12s %-12s %s\n' \
350350
"$_scanid" "$_state" "${_meta_pid:-?}" \
351351
"${_meta_engine:--}" "${_meta_total_files:--}" "${_meta_hits:-0}" \
352352
"$_elapsed_str" "$_eta_str" "${_meta_workers:--}" "${_meta_sig_version:--}" "$_progress_str" \
353353
"${_meta_path:--}"
354354
else
355-
printf ' %-22s %-10s %-7s %-8s %-10s %-6s %-10s %-10s %s\n' \
355+
printf ' %-22s %-10s %-7s %-8s %-10s %-6s %-10s %-10s %s\n' \
356356
"$_scanid" "$_state" "${_meta_pid:-?}" \
357357
"${_meta_engine:--}" "${_meta_total_files:--}" "${_meta_hits:-0}" \
358358
"$_elapsed_str" "$_eta_str" "${_meta_path:--}"

files/internals/lmd_session.sh

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -375,20 +375,15 @@ view_report() {
375375
_ix_tot_quar="0"
376376
fi
377377
_seen_ids="$_seen_ids $_ix_scanid"
378-
local _time_display _etime _cl _quar _trunc_path
378+
local _time_display _etime _cl _quar
379379
# Strip timezone offset for column alignment
380380
_time_display=$(echo "$_ix_started_hr" | awk '{print $1,$2,$3,$4}')
381381
_etime=$(_session_fmt_elapsed "$_ix_elapsed")
382382
_cl="${_ix_tot_cl:-0}"
383383
[ "$_cl" = "-" ] && _cl="0"
384384
_quar="${_ix_tot_quar:-0}"
385385
[ "$_quar" = "-" ] && _quar="0"
386-
# Truncate path to 30 chars with ellipsis
387-
_trunc_path="${_ix_path:--}"
388-
if [ "${#_trunc_path}" -gt 30 ]; then
389-
_trunc_path="${_trunc_path:0:27}..."
390-
fi
391-
echo "$_ix_epoch | $_time_display | $_ix_scanid | $_etime | ${_ix_tot_files:--} | ${_ix_tot_hits:--} | $_quar | $_cl | $_trunc_path" >> "$tmpf"
386+
echo "$_ix_epoch | $_time_display | $_ix_scanid | $_etime | ${_ix_tot_files:--} | ${_ix_tot_hits:--} | $_quar | $_cl | ${_ix_path:--}" >> "$tmpf"
392387
done < "$_index_file"
393388
fi
394389
# Fallback: per-file glob for sessions not in the index
@@ -400,7 +395,7 @@ view_report() {
400395
case "$_seen_ids" in *" $_sid"*) continue ;; esac
401396
_session_read_meta "$file"
402397
if [ -n "$scanid" ] && [ "$scan_start_hr" != "-" ]; then
403-
local _time_u _etime _time_display _trunc_path
398+
local _time_u _etime _time_display
404399
_time_u=$(date -d "$scan_start_hr" "+%s" 2>/dev/null)
405400
# Strip timezone offset for consistent column alignment with legacy pass
406401
_time_display=$(echo "$scan_start_hr" | awk '{print $1,$2,$3,$4}')
@@ -410,12 +405,7 @@ view_report() {
410405
# Count quarantined from TSV hit records
411406
local _quar
412407
_quar=$(awk -F'\t' '!/^#/ && $3 != "" && $3 != "-" { n++ } END { print n+0 }' "$file")
413-
# Truncate path to 30 chars with ellipsis
414-
_trunc_path="${hrspath:--}"
415-
if [ "${#_trunc_path}" -gt 30 ]; then
416-
_trunc_path="${_trunc_path:0:27}..."
417-
fi
418-
echo "$_time_u | $_time_display | $scanid | $_etime | ${tot_files:--} | ${tot_hits:--} | $_quar | $_cl | $_trunc_path" >> "$tmpf"
408+
echo "$_time_u | $_time_display | $scanid | $_etime | ${tot_files:--} | ${tot_hits:--} | $_quar | $_cl | ${hrspath:--}" >> "$tmpf"
419409
_seen_ids="$_seen_ids $_sid"
420410
fi
421411
done
@@ -439,12 +429,8 @@ view_report() {
439429
CLEAN="0"
440430
fi
441431
if [ -n "$SCANID" ] && [ -n "$TIME" ]; then
442-
local _trunc_path="${LPATH:--}"
443-
if [ "${#_trunc_path}" -gt 30 ]; then
444-
_trunc_path="${_trunc_path:0:27}..."
445-
fi
446432
# Legacy plaintext sessions have no quarantine count — show "-"
447-
echo "$TIME_U | $TIME | $SCANID | $ETIME | ${FILES:--} | ${HITS:--} | - | $CLEAN | $_trunc_path" >> "$tmpf"
433+
echo "$TIME_U | $TIME | $SCANID | $ETIME | ${FILES:--} | ${HITS:--} | - | $CLEAN | ${LPATH:--}" >> "$tmpf"
448434
fi
449435
done
450436
# Display sorted results with section header and cap

0 commit comments

Comments
 (0)