From 7f1e9bf57f49eaaa690dc50cdca7448ff4ce0a85 Mon Sep 17 00:00:00 2001 From: Fabian Boehm Date: Fri, 19 Aug 2022 20:26:10 +0200 Subject: [PATCH] Also convert fish_job_summary --- share/functions/fish_job_summary.fish | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/share/functions/fish_job_summary.fish b/share/functions/fish_job_summary.fish index 004d593be..f2baf4ca8 100644 --- a/share/functions/fish_job_summary.fish +++ b/share/functions/fish_job_summary.fish @@ -24,16 +24,8 @@ function fish_job_summary -a job_id is_foreground cmd_line signal_or_end_name si return end - set -l ellipsis '...' - if string match -iqr 'utf.?8' -- $LANG - set ellipsis \u2026 - end - set -l max_cmd_len 32 - if test (string length $cmd_line) -gt $max_cmd_len - set -l truncated_len (math $max_cmd_len - (string length $ellipsis)) - set cmd_line (string trim (string sub -l $truncated_len $cmd_line))$ellipsis - end + set cmd_line (string shorten -m$max_cmd_len -- $cmd_line) if test $is_foreground -eq 0; and test $signal_or_end_name != STOPPED # Add a newline *before* our message so we get the message after the commandline.