Adding autocomplete to python -m rich.markdown
(and a couple of unrelated questions)
#1788
Unanswered
jpmvferreira
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there,
I've been trying to integrate this library with a knowledge database, which prints file contents to the terminal which I use as cheat sheets, and writing them in Markdown in my terminal and then latter having them rendered using rich in the terminal is great.
One minor thing, which given the amount of flags rich has is relatively pointless, that would add some ease of use to using this in the terminal would be an autocomplete.
Now for the questions.
My first question is regarding the
--justify
and--inline-code-lexer
flags. What are they meant to do? Using--justify
shows no change and setting--inline-code-lexer
to a random string sets my inline background brownish, which is great, because I wanted the added contrast!The second question, which might be a bug, is the fact that I cannot use the pager when getting files from STDIN. For example, doing
python -m rich.markdown README.md -y -p
opens in the pager,less
is the default pager on my system, while doingcat README.md | python -m rich.markdown - -y -p
does not. Is anybody able to reproduce this? I haven't found anything similar in the issue section.My third question I regarding which themes do I have pre-installed with rich to change my syntax highlighting. I see there's an option to provide custom pygment themes, but unfortunately after trying a bunch of random themes I expected to find (e.g.: maokai, solarized, dracula) none is found. Am I meant to define my own pygment themes and give the path instead?
My fourth and final question is about pagers. I know this is totally unrelated to the project at hand, but,
less
doesn't seem to provide much features. While looking for more pagers I came acrossmost
but it seems to break when using several characters or colors. Otherwise my results came out empty, which is surprising since pagers is not exactly an exiting topic for most users, even Linux users.Beta Was this translation helpful? Give feedback.
All reactions