2
2
mirror of https://github.com/Hilbis/Hilbish synced 2025-05-10 14:23:23 +00:00

deploy: dfaff9ce33ca3c7f96d73cbcce7300bc41ddc694

This commit is contained in:
sammy-ette 2025-05-08 18:29:31 +00:00
parent 0faafa8742
commit e111134503
2 changed files with 34 additions and 7 deletions

View File

@ -28,7 +28,35 @@ Example:</p><div class=highlight><pre tabindex=0 class=chroma><code class=langua
</span></span><span class=line><span class=ln>13</span><span class=cl><span class=kr>return</span> <span class=p>{</span><span class=n>cg</span><span class=p>,</span> <span class=n>cg2</span><span class=p>},</span> <span class=n>prefix</span> </span></span><span class=line><span class=ln>13</span><span class=cl><span class=kr>return</span> <span class=p>{</span><span class=n>cg</span><span class=p>,</span> <span class=n>cg2</span><span class=p>},</span> <span class=n>prefix</span>
</span></span></code></pre></div><p>Which looks like this:<br><video src=https://safe.saya.moe/t4CiLK6dgPbD.mp4 style=height:auto;max-width:100% controls> </span></span></code></pre></div><p>Which looks like this:<br><video src=https://safe.saya.moe/t4CiLK6dgPbD.mp4 style=height:auto;max-width:100% controls>
There's a video missing here... There's a video missing here...
Well here is the URL: https://safe.saya.moe/t4CiLK6dgPbD.mp4</video></p><h2 id=completion-handler class=heading>Completion Handler Well here is the URL: https://safe.saya.moe/t4CiLK6dgPbD.mp4</video></p><h2 id=completion-group-types class=heading>Completion Group Types
<a href=#completion-group-types class=heading-link><i class="fas fa-paperclip"></i></a></h2><h4 id=grid class=heading>grid
<a href=#grid class=heading-link><i class="fas fa-paperclip"></i></a></h4><p>Grid is the simplest completion group type. All items are strings and when
completion is done is displayed in a grid based on size.</p><p>Example:</p><div class=highlight><pre tabindex=0 class=chroma><code class=language-lua data-lang=lua><span class=line><span class=ln>1</span><span class=cl><span class=p>{</span>
</span></span><span class=line><span class=ln>2</span><span class=cl> <span class=n>items</span> <span class=o>=</span> <span class=p>{</span><span class=s1>&#39;just&#39;</span><span class=p>,</span> <span class=s1>&#39;a bunch&#39;</span><span class=p>,</span> <span class=s1>&#39;of items&#39;</span><span class=p>,</span> <span class=s1>&#39;here&#39;</span><span class=p>,</span> <span class=s1>&#39;hehe&#39;</span><span class=p>},</span>
</span></span><span class=line><span class=ln>3</span><span class=cl> <span class=n>type</span> <span class=o>=</span> <span class=s1>&#39;grid&#39;</span>
</span></span><span class=line><span class=ln>4</span><span class=cl><span class=p>}</span>
</span></span></code></pre></div><h4 id=list class=heading>list
<a href=#list class=heading-link><i class="fas fa-paperclip"></i></a></h4><p>The list completion group type displays in a list. A list item can either be a string, or a table for additional display options.
A completion alias can be specified either as the <code>2nd</code> entry in the options table
or te <code>alias</code> key.</p><p>A description can optionally be displayed for a list item, which is either the <code>1st</code>
entry or the <code>description</code> key.</p><p>Lastly, list entries can be styled. This is done with the <code>display</code> key. If this is present, this
overrides what the completion item <em>looks</em> like.</p><p>Example:</p><div class=highlight><pre tabindex=0 class=chroma><code class=language-lua data-lang=lua><span class=line><span class=ln> 1</span><span class=cl><span class=p>{</span>
</span></span><span class=line><span class=ln> 2</span><span class=cl> <span class=n>items</span> <span class=o>=</span> <span class=p>{</span>
</span></span><span class=line><span class=ln> 3</span><span class=cl> <span class=p>[</span><span class=s1>&#39;--flag&#39;</span><span class=p>]</span> <span class=o>=</span> <span class=p>{</span>
</span></span><span class=line><span class=ln> 4</span><span class=cl> <span class=n>description</span> <span class=o>=</span> <span class=s1>&#39;this flag nukes the bri ish&#39;</span><span class=p>,</span>
</span></span><span class=line><span class=ln> 5</span><span class=cl> <span class=n>alias</span> <span class=o>=</span> <span class=s1>&#39;--bye-bri-ish&#39;</span><span class=p>,</span>
</span></span><span class=line><span class=ln> 6</span><span class=cl> <span class=n>display</span> <span class=o>=</span> <span class=n>lunacolors.format</span><span class=p>(</span><span class=s1>&#39;--{blue}fl{red}ag&#39;</span><span class=p>)</span>
</span></span><span class=line><span class=ln> 7</span><span class=cl> <span class=p>},</span>
</span></span><span class=line><span class=ln> 8</span><span class=cl> <span class=p>[</span><span class=s1>&#39;--flag2&#39;</span><span class=p>]</span> <span class=o>=</span> <span class=p>{</span>
</span></span><span class=line><span class=ln> 9</span><span class=cl> <span class=s1>&#39;make pizza&#39;</span><span class=p>,</span> <span class=c1>-- description</span>
</span></span><span class=line><span class=ln>10</span><span class=cl> <span class=s1>&#39;--pizzuh&#39;</span><span class=p>,</span> <span class=c1>-- alias</span>
</span></span><span class=line><span class=ln>11</span><span class=cl> <span class=n>display</span> <span class=o>=</span> <span class=n>lunacolors.yellow</span> <span class=s1>&#39;--pizzuh&#39;</span>
</span></span><span class=line><span class=ln>12</span><span class=cl> <span class=p>},</span>
</span></span><span class=line><span class=ln>13</span><span class=cl> <span class=s1>&#39;--flag3&#39;</span>
</span></span><span class=line><span class=ln>14</span><span class=cl> <span class=p>},</span>
</span></span><span class=line><span class=ln>15</span><span class=cl> <span class=n>type</span> <span class=o>=</span> <span class=s1>&#39;list&#39;</span>
</span></span><span class=line><span class=ln>16</span><span class=cl><span class=p>}</span>
</span></span></code></pre></div><h2 id=completion-handler class=heading>Completion Handler
<a href=#completion-handler class=heading-link><i class="fas fa-paperclip"></i></a></h2><p>Like most parts of Hilbish, it&rsquo;s made to be extensible and <a href=#completion-handler class=heading-link><i class="fas fa-paperclip"></i></a></h2><p>Like most parts of Hilbish, it&rsquo;s made to be extensible and
customizable. The default handler for completions in general can customizable. The default handler for completions in general can
be overwritten to provide more advanced completions if needed. be overwritten to provide more advanced completions if needed.

View File

@ -12,9 +12,8 @@ you can just use <code>lunacolors.blue 'Hello world'</code> and that&rsquo;ll re
blue text which you can print. This includes styles like bold, blue text which you can print. This includes styles like bold,
underline, etc.</p><p>In other usage, you may want to use a format string instead of having underline, etc.</p><p>In other usage, you may want to use a format string instead of having
multiple nested functions for different styles. This is where the format multiple nested functions for different styles. This is where the format
function comes in. You can used named keywords to style a section of text.</p><p>The list of arguments are: function comes in. You can used named keywords to style a section of text.</p><p>The list of arguments are:<br>Colors:</p><ul><li>black</li><li>red</li><li>green</li><li>yellow</li><li>blue</li><li>magenta</li><li>cyan</li><li>white</li></ul><p>Styles:</p><ul><li>reset</li><li>bold</li><li>dim</li><li>italic</li><li>underline</li><li>invert</li></ul><p>For the colors, there are background and bright variants. Background color
Colors:</p><ul><li>black</li><li>red</li><li>green</li><li>yellow</li><li>blue</li><li>magenta</li><li>cyan</li><li>white variants have a <code>Bg</code> suffix, while bright variants use the <code>bright</code> prefix.
Styles:</li><li>bold</li><li>dim</li><li>italic</li><li>underline</li><li>invert</li></ul><p>For the colors, there are background and bright variants. The background These can also be combined. Note that appropriate camel casing must be applied.
color variants have a suffix of <code>Bg</code> and bright has a prefix of <code>bright</code>. For example, bright blue would be written as <code>brightBlue</code>, a cyan background as
Note that appropriate camel casing has to be applied to them. So bright <code>cyanBg</code>, and combining them would result in <code>brightBlueBg</code>.</p></div><div class="footer mt-auto"><p class="card-small text-muted">Want to help improve this page? <a href=https://github.com/Rosettea/Hilbish/issues/new/choose>Create an issue.</a></p></div></container></div><footer class="footer mt-auto mt-auto py-3 bg-light row border-top"><div class="col mb-3"></div><div class="col mb-3"><a href=/Hilbish class="d-flex align-items-center mb-3 link-dark text-decoration-none"><img src=/Hilbish/hilbish-logo-and-text.png alt height=48 class="d-inline-block align-text-top" style=margin-left:-20px></a><ul class="nav flex-column"><li class="nav-item mb-2"><a href=/Hilbish class="nav-link p-0 text-muted">Home</a></li><li class="nav-item mb-2"><a href=/Hilbish/docs/faq class="nav-link p-0 text-muted">FAQ</a></li><li class="nav-item mb-2"><a href=https://github.com/Rosettea/Hilbish class="nav-link p-0 text-muted">Source</a></li><li class="nav-item mb-2"><a href=https://github.com/Rosettea/Hilbish/releases class="nav-link p-0 text-muted">Releases</a></li><li class="nav-item mb-2"><a href=/Hilbish/docs class="nav-link p-0 text-muted">Documentation</a></li></ul></div><div class="col mb-3"></div><div class="col mb-3"></div><div class="col mb-3"></div><div class="col mb-3"><p class="text-muted mt-4">Rosettea &copy; 2022-2023<br>Made with <i class="fa-solid fa-heart" style=color:#f6345b></i></p></div><div class="col mb-3"></div></footer></body></html>
blue would be <code>brightBlue</code> and background cyan would be <code>cyanBg</code>.</p></div><div class="footer mt-auto"><p class="card-small text-muted">Want to help improve this page? <a href=https://github.com/Rosettea/Hilbish/issues/new/choose>Create an issue.</a></p></div></container></div><footer class="footer mt-auto mt-auto py-3 bg-light row border-top"><div class="col mb-3"></div><div class="col mb-3"><a href=/Hilbish class="d-flex align-items-center mb-3 link-dark text-decoration-none"><img src=/Hilbish/hilbish-logo-and-text.png alt height=48 class="d-inline-block align-text-top" style=margin-left:-20px></a><ul class="nav flex-column"><li class="nav-item mb-2"><a href=/Hilbish class="nav-link p-0 text-muted">Home</a></li><li class="nav-item mb-2"><a href=/Hilbish/docs/faq class="nav-link p-0 text-muted">FAQ</a></li><li class="nav-item mb-2"><a href=https://github.com/Rosettea/Hilbish class="nav-link p-0 text-muted">Source</a></li><li class="nav-item mb-2"><a href=https://github.com/Rosettea/Hilbish/releases class="nav-link p-0 text-muted">Releases</a></li><li class="nav-item mb-2"><a href=/Hilbish/docs class="nav-link p-0 text-muted">Documentation</a></li></ul></div><div class="col mb-3"></div><div class="col mb-3"></div><div class="col mb-3"></div><div class="col mb-3"><p class="text-muted mt-4">Rosettea &copy; 2022-2023<br>Made with <i class="fa-solid fa-heart" style=color:#f6345b></i></p></div><div class="col mb-3"></div></footer></body></html>