1
0
Fork 0
vdotfiles/cli/.config/fish/functions/fish_prompt.add.fish

15 lines
323 B
Fish
Raw Normal View History

2024-09-10 12:22:46 +03:00
function fish_prompt.add
2023-08-21 20:58:02 +03:00
set -l text $argv[1]
set -l color $argv[2]
if test -n "$color"
set value (set_color $color)$text(set_color normal)
else
set value $text
end
2023-02-05 22:13:01 +02:00
if test -z "$prompt_string"
2023-08-21 20:58:02 +03:00
set prompt_string $value
2023-02-05 22:13:01 +02:00
else
2023-08-21 20:58:02 +03:00
set -a prompt_string $value
2023-02-05 22:13:01 +02:00
end
end