Don't print multiple summaries for multiline jobs

For example

    $ echo 'line
    line2' | sleep 1 &

    fish: Job 1, 'echo 'line' has ended
    fish: Job     line2' | sleep 1 &, '' has ended
This commit is contained in:
Johannes Altmanninger 2024-04-29 10:46:30 +02:00
parent 8639d7e450
commit 1185e5279e

View File

@ -25,7 +25,7 @@ function fish_job_summary -a job_id is_foreground cmd_line signal_or_end_name si
end
set -l max_cmd_len 32
set cmd_line (string shorten -m$max_cmd_len -- $cmd_line)
set cmd_line (string shorten -m$max_cmd_len -- $cmd_line | string collect)
set -l message
switch $signal_or_end_name