Skip to content

Commit

Permalink
🚀🚀🎭
Browse files Browse the repository at this point in the history
  • Loading branch information
quantum-quirks committed Mar 11, 2022
1 parent 1a2a2ec commit 71a9a21
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 423 deletions.
14 changes: 11 additions & 3 deletions docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,15 @@
.. image:: https://media.giphy.com/media/12oufCB0MyZ1Go/giphy.gif

Changelog
=========
==========
``Version 2022.3.1``
---------------------

Unreleased

**Added**
^^^^^^^^^^^
- Added :param:`ul` as an alias of :param:`underline` for :class:`~quo.style.Style`.

``Version 2022.3``
--------------------
Expand All @@ -14,8 +22,8 @@ Released on 2022-3-6

**Added**
^^^^^^^^^^
- Added :kbd:`<any>` enabling the user to press any key to exit the help page.
- Introduced :class:`quo.keys.Bind` as an alias of :class:`quo.keys.KeyBinder`
- Added key binder :kbd:`<any>` enabling the user to press any key to exit the help page.
- Introduced :class:`~quo.keys.Bind` as an alias of :class:`quo.keys.KeyBinder`

**Changed**
^^^^^^^^^^^^
Expand Down
Binary file removed docs/images/colored-prompt.png
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/printing_text.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Parameters

* ``reset`` – by default a reset-all code is added at the end of the string which means that styles do not carry over. This can be disabled to compose styles.

`'print``
``print``
----------
quo ships with a
:func:`~quo.print` function that's meant to
Expand Down
44 changes: 16 additions & 28 deletions docs/prompt.rst
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ The following example returns a callable
from quo.style import Style
style = Style.add({'rprompt': 'bg:red fg:white',})
style = Style.add({'rprompt': 'bg:red fg:white'})
def get_rprompt():
return '<rprompt>'
Expand Down Expand Up @@ -424,34 +424,22 @@ creating a list of style/text tuples. In the following example, we use class nam
.. code:: python
from quo.prompt import Prompt
from quo.style import Style
from quo.prompt import Prompt
from quo.style import Style
session = Prompt()
style = Style.add({' ':'fg:blue'}) # User input (default text)
session = Prompt(style=style)
message = [
('fg:red', 'john'),
('fg:white', '@'),
('fg:green bg:white', 'localhost'),
('fg:yellow', ':'),
('fg:cyan underline', '/user/john'),
('fg:grey', '$ ')
]
style = Style.add({
# User input (default text).
'': 'fg:blue',
# Prompt.
'username': 'fg:red',
'at': 'fg:white',
'colon': 'fg:yellow',
'pound': 'fg:grey',
'host': 'fg:green bg:#444400',
'path': 'fg:cyan underline',
})
message = [
('class:username', 'john'),
('class:at', '@'),
('class:host', 'localhost'),
('class:colon', ':'),
('class:path', '/user/john'),
('class:pound', '# '),
]
session.prompt(message, style=style)
session.prompt(message)
.. image:: ./images/colored-prompt.png
Expand All @@ -467,7 +455,7 @@ By default, colors are taken from the 256 color palette. If you want to have 24b
session = Prompt(
style=style,
color_depth=ColorDepth.TRUE.COLOR
color_depth=ColorDepth.TRUE_COLOR
)
Expand Down
Loading

0 comments on commit 71a9a21

Please sign in to comment.