From dfc188f0cbecddfcbefe045263ae68d3777f2104 Mon Sep 17 00:00:00 2001 From: Hovnatan Karapetyan Date: Thu, 29 Sep 2022 15:41:19 +0400 Subject: [PATCH 1/2] Add option --- conf.d/fish_command_timer.fish | 3 +++ 1 file changed, 3 insertions(+) diff --git a/conf.d/fish_command_timer.fish b/conf.d/fish_command_timer.fish index f37617e..fa4ebc6 100644 --- a/conf.d/fish_command_timer.fish +++ b/conf.d/fish_command_timer.fish @@ -281,6 +281,9 @@ function fish_command_timer_postexec -e fish_postexec set status_str_colored "$status_str" end + if fish_command_timer_only_string + set -g fish_command_timer_string "$status_str_colored $timing_str_colored" + end # Combine status string and timing string. set -l output_length (math $timing_str_length + $status_str_length + 1) From 1f7b8e143bceea53e5dcf053374865e1e9fd2088 Mon Sep 17 00:00:00 2001 From: Hovnatan Karapetyan Date: Thu, 29 Sep 2022 15:50:50 +0400 Subject: [PATCH 2/2] Add option --- conf.d/fish_command_timer.fish | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/conf.d/fish_command_timer.fish b/conf.d/fish_command_timer.fish index fa4ebc6..f7f712f 100644 --- a/conf.d/fish_command_timer.fish +++ b/conf.d/fish_command_timer.fish @@ -42,6 +42,10 @@ if not set -q fish_command_timer_status_enabled set fish_command_timer_status_enabled 0 end +if not set -q fish_command_timer_export_only_string + set fish_command_timer_export_only_string 0 +end + # The color of the output. # # This should be a color string accepted by fish's set_color command, as @@ -281,9 +285,11 @@ function fish_command_timer_postexec -e fish_postexec set status_str_colored "$status_str" end - if fish_command_timer_only_string + if [ $fish_command_timer_export_only_string -ne 0 ] set -g fish_command_timer_string "$status_str_colored $timing_str_colored" + return end + # Combine status string and timing string. set -l output_length (math $timing_str_length + $status_str_length + 1)