docs/prompt: A few small fixes

`set_color` does *just* the formatting, the string to color needs to
be added separately
This commit is contained in:
Fabian Boehm 2024-02-03 11:10:32 +01:00
parent 8e73a4c5af
commit f8da013f33

View File

@ -76,7 +76,7 @@ A "normal" color tells the terminal to go back to its normal formatting options.
interpret as instructions - for example, to change color. So ``set_color red`` produces the same interpret as instructions - for example, to change color. So ``set_color red`` produces the same
effect as:: effect as::
echo \e\[31mfoo echo \e\[31m
Although you can write your own escape sequences by hand, it's much easier to use ``set_color``. Although you can write your own escape sequences by hand, it's much easier to use ``set_color``.
@ -114,7 +114,7 @@ First of all, since every command (except for :doc:`set <cmds/set>`) changes the
set -l last_status $status set -l last_status $status
And after that, you can set a string if it not zero:: And after that, you can set a string if it is not zero::
# Prompt status only if it's not 0 # Prompt status only if it's not 0
set -l stat set -l stat