mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-10 07:04:29 +00:00
docs/tutorial: Fix prompt display
This displays a colored prompt, which we emulate by adding explicit roles that are translated to css classes. For other things, like "eror" this might not be enough because those often need the rest of the line to still be styled, and I've not found a way to add some explicit styling to a code block. See #5696. [ci skip]
This commit is contained in:
parent
e339e0f389
commit
cf9b2ff1e5
2 changed files with 9 additions and 2 deletions
|
@ -77,3 +77,5 @@
|
|||
.highlight .vi { color: #000000 } /* Name.Variable.Instance */
|
||||
.highlight .vm { color: #000000 } /* Name.Variable.Magic */
|
||||
.highlight .il { color: #0000cf; font-weight: bold } /* Literal.Number.Integer.Long */
|
||||
.purple { color: #551a8b }
|
||||
.yellow { color: #FFFF00 }
|
||||
|
|
|
@ -567,6 +567,9 @@ You can define your own prompt::
|
|||
New Prompt %
|
||||
|
||||
|
||||
.. role:: purple
|
||||
.. role:: yellow
|
||||
|
||||
Multiple lines are OK. Colors can be set via ``set_color``, passing it named ANSI colors, or hex RGB values::
|
||||
|
||||
>_ function fish_prompt
|
||||
|
@ -575,9 +578,11 @@ Multiple lines are OK. Colors can be set via ``set_color``, passing it named ANS
|
|||
set_color FF0
|
||||
echo (pwd) '>' (set_color normal)
|
||||
end
|
||||
<span style="color: purple">02/06/13</span>
|
||||
<span style="color: #FF0">/home/tutorial ></span>___
|
||||
|
||||
will look like
|
||||
|
||||
| :purple:`02/06/13`
|
||||
| :yellow:`/home/tutorial >`
|
||||
|
||||
You can choose among some sample prompts by running ``fish_config prompt``. ``fish`` also supports RPROMPT through ``fish_right_prompt``.
|
||||
|
||||
|
|
Loading…
Reference in a new issue