jichu4n / fish-command-timer

Fish shell extension for printing execution time for each command.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make the output a variable that can be manipulated in config.fish?

Konstruktionist opened this issue · comments

I don't know if this is possible, because I don't quite understand what lines 216 & 218 do exactly.

But it would be nice if I could decorate the output to my liking.
I've done it now by editing line 200 & 202. I didn't like the square brackets and I put a delta ("𝛅 ") in front of the execution time.
I feel that this shouldn't be done in the script itself but as a variable setting in config.fish.

Otherwise awesome function. It has helped me to improve my scripts & actually quantify the speed improvements.

I realize I forgot to update this issue - this was implemented in PR #6 and #7 . As documented in the README, you can achieve this with the following variables:

  1. set fish_command_timer_enabled 0 to disable printing;
  2. set fish_command_timer_export_cmd_duration_str 1 to export the duration string to $CMD_DURATION_STR, which can be further manipulated.