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

15 lines
318 B
Fish
Raw Normal View History

2023-02-05 22:13:01 +02:00
function 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