File tree Expand file tree Collapse file tree 1 file changed +0
-16
lines changed
managed/dot_config/fish/user Expand file tree Collapse file tree 1 file changed +0
-16
lines changed Original file line number Diff line number Diff line change 55# track when commands actually execute
66function __my_prompt_preexec --on-event fish_preexec
77 set -g __my_prompt_cmd_executed 1
8-
9- # add timestamp right after the stored first line content
10- set -l timestamp (date ' +%H:%M:%S' )
11- printf ' \ e[2A\ e[1G' # go up 2 lines and to beginning
12-
13- # reprint the stored first line and add timestamp
14- printf ' %s ' $_ _my_prompt_first_line
15- set_color brblack
16- printf ' [%s]' $timestamp
17- set_color normal
18- printf ' \ e[2B\ e[1G' # move back down to command line
198end
209
2110function __my_prompt_postexec --on-event fish_postexec
@@ -74,11 +63,6 @@ function fish_prompt
7463 set -l parts_str (string join ' ' -- $parts )
7564 printf ' %s' $parts_str
7665 set_color normal
77-
78- # store the complete first line for timestamp positioning
79- set -g __my_prompt_first_line $cwd_part " " $parts_str
80- else
81- set -g __my_prompt_first_line $cwd_part
8266 end
8367 printf ' \ n'
8468
You can’t perform that action at this time.
0 commit comments