Skip to content

Commit

Permalink
Update for v1.7.5
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisant996 committed Nov 11, 2024
1 parent 3205f40 commit bb88ece
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 7 deletions.
6 changes: 3 additions & 3 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
theme: jekyll-theme-cayman
title: Clink
github:
version: v1.7.4
download_url: https://github.com/chrisant996/clink/releases/download/v1.7.4/clink.1.7.4.d1920c.zip
install_url: https://github.com/chrisant996/clink/releases/download/v1.7.4/clink.1.7.4.d1920c_setup.exe
version: v1.7.5
download_url: https://github.com/chrisant996/clink/releases/download/v1.7.5/clink.1.7.5.aee4f7.zip
install_url: https://github.com/chrisant996/clink/releases/download/v1.7.5/clink.1.7.5.aee4f7_setup.exe
45 changes: 41 additions & 4 deletions clink.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<!-- ----------------------------------------------------- -->
<head>
<title>Clink v1.7.4</title>
<title>Clink v1.7.5</title>
<style>
@import url('https://fonts.googleapis.com/css2?family=Rambla:wght@400;700&family=Roboto&family=Fira+Mono&display=swap');
html {
Expand Down Expand Up @@ -954,7 +954,7 @@
</td>
<td style="text-align:right">
<div id="header">
<div id="title">Clink v1.7.4</div>
<div id="title">Clink v1.7.5</div>
<div id="branch"></div>
<div id="url">
<a href="https://github.com/chrisant996/clink">
Expand Down Expand Up @@ -7541,7 +7541,7 @@ <h5 id="clink" class="group_name"><a class="wlink" href="#clink"><svg width=16 h

</div><div class="group">
<h5 id="console" class="group_name"><a class="wlink" href="#console"><svg width=16 height=16><use href="#wicon"/></svg><span class="wfix">.</span></a>console. <span class="uplinks"><a href="#lua-api-groups">up</a> <a href="#lua-api">apis</a> <a href="#toc">top</a></span></h5>
<table class="grouplist"><tr><td><a href="#console.cellcount">cellcount</a></td><td><a href="#console.getcolortable">getcolortable</a></td><td><a href="#console.gettop">gettop</a></td><td><a href="#console.screengrab">screengrab</a></td></tr><tr><td><a href="#console.cellcountiter">cellcountiter</a></td><td><a href="#console.getcursorpos">getcursorpos</a></td><td><a href="#console.getwidth">getwidth</a></td><td><a href="#console.scroll">scroll</a></td></tr><tr><td><a href="#console.checkinput">checkinput</a></td><td><a href="#console.getheight">getheight</a></td><td><a href="#console.islinedefaultcolor">islinedefaultcolor</a></td><td><a href="#console.settitle">settitle</a></td></tr><tr><td><a href="#console.explodeansi">explodeansi</a></td><td><a href="#console.getlinetext">getlinetext</a></td><td><a href="#console.linehascolor">linehascolor</a></td></tr><tr><td><a href="#console.findnextline">findnextline</a></td><td><a href="#console.getnumlines">getnumlines</a></td><td><a href="#console.plaintext">plaintext</a></td></tr><tr><td><a href="#console.findprevline">findprevline</a></td><td><a href="#console.gettitle">gettitle</a></td><td><a href="#console.readinput">readinput</a></td></tr></table>
<table class="grouplist"><tr><td><a href="#console.cellcount">cellcount</a></td><td><a href="#console.findprevline">findprevline</a></td><td><a href="#console.gettitle">gettitle</a></td><td><a href="#console.readinput">readinput</a></td></tr><tr><td><a href="#console.cellcountiter">cellcountiter</a></td><td><a href="#console.getcolortable">getcolortable</a></td><td><a href="#console.gettop">gettop</a></td><td><a href="#console.screengrab">screengrab</a></td></tr><tr><td><a href="#console.checkinput">checkinput</a></td><td><a href="#console.getcursorpos">getcursorpos</a></td><td><a href="#console.getwidth">getwidth</a></td><td><a href="#console.scroll">scroll</a></td></tr><tr><td><a href="#console.ellipsify">ellipsify</a></td><td><a href="#console.getheight">getheight</a></td><td><a href="#console.islinedefaultcolor">islinedefaultcolor</a></td><td><a href="#console.settitle">settitle</a></td></tr><tr><td><a href="#console.explodeansi">explodeansi</a></td><td><a href="#console.getlinetext">getlinetext</a></td><td><a href="#console.linehascolor">linehascolor</a></td></tr><tr><td><a href="#console.findnextline">findnextline</a></td><td><a href="#console.getnumlines">getnumlines</a></td><td><a href="#console.plaintext">plaintext</a></td></tr></table>
<div class="function"><div class="header"> <div id="console.cellcount" class="name"><a class="wlink" href="#console.cellcount"><svg width=16 height=16><use href="#wicon"/></svg><span class="wfix">.</span></a><span>console.cellcount</span> <span class="uplinks"><a href="#console">up</a> <a href="#lua-api">apis</a> <a href="#toc">top</a></span></div> <div class="signature">( <span class="arg_name">text</span>:string ) : integer<br/><div class="version">v1.2.5 and newer</div></div></div><div class="body"><p class="desc">Returns the count of visible character cells that would be consumed if the <span class="arg">text</span> string were output to the console, accounting for any ANSI escape codes that may be present in the text.</p><p class="desc"> <strong>Note:</strong> Backspace characters and line endings are counted as visible character cells and will skew the resulting count.</p></div></div><hr/>

<div class="function"><div class="header"> <div id="console.cellcountiter" class="name"><a class="wlink" href="#console.cellcountiter"><svg width=16 height=16><use href="#wicon"/></svg><span class="wfix">.</span></a><span>console.cellcountiter</span> <span class="uplinks"><a href="#console">up</a> <a href="#lua-api">apis</a> <a href="#toc">top</a></span></div> <div class="signature">( <span class="arg_name">text</span>:string ) : iterator<br/><div class="version">v1.7.4 and newer</div></div></div><div class="body"><p class="desc">This returns an iterator function which steps through <span class="arg">text</span> one glyph at a time. Each call to the iterator function returns the string for the next glyph, the count of visible character cells that would be consumed when displaying it in the terminal, and a boolean indicating whether the string is an emoji.</p><p class="desc"> <strong>Note:</strong> This only recognizes emojis if Clink recognizes that the terminal program supports emojis. The results are "best effort", and may differ from reality depending on the specific OS version, terminal program (and its version), and the input string. The width prediction is based on the Unicode emoji specification, with accommodations for how Windows Terminal renders certain emoji sequences.</p><pre class="language-lua"><code>-- UTF8 sample string:
Expand Down Expand Up @@ -7586,6 +7586,33 @@ <h5 id="console" class="group_name"><a class="wlink" href="#console"><svg width=
&nbsp; end
end</code></pre></div></div><hr/>

<div class="function"><div class="header"> <div id="console.ellipsify" class="name"><a class="wlink" href="#console.ellipsify"><svg width=16 height=16><use href="#wicon"/></svg><span class="wfix">.</span></a><span>console.ellipsify</span> <span class="uplinks"><a href="#console">up</a> <a href="#lua-api">apis</a> <a href="#toc">top</a></span></div> <div class="signature">( <span class="arg_name">text</span>:string, <span class="arg_name">limit</span>:integer, [<span class="arg_name">mode</span>:string], [<span class="arg_name">ellipsis</span>:string] ) : string, integer<br/><div class="version">v1.7.5 and newer</div></div></div><div class="body"><p class="desc">Returns as much of <span class="arg">text</span> as fits in <span class="arg">limit</span> screen columns, truncated with either an ellipsis or the optional custom <span class="arg">ellipsis</span> string.</p><p class="desc"> The optional <span class="arg">mode</span> can be any of the following:</p><p class="desc"> <table> <tr><th>Value</th><th>Description</th></tr> <tr><td><code>"right"</code></td><td>Truncates from the right end of the input string.</td></tr> <tr><td><code>"left"</code></td><td>Truncates from the left end of the input string.</td></tr> <tr><td><code>"path"</code></td><td>Treats the input string as a file path and keeps any drive specifier, and truncates any directory portion from its left end.</td></tr> </table></p><p class="desc"> <strong>Note:</strong> Both <span class="arg">text</span> and/or <span class="arg">ellipsis</span> may include ANSI escape codes. When the <code>"left"</code> or <code>"path"</code> truncation modes are used, then any ANSI escape code to the left of the ellipsis are preserved, to ensure consistent styling regardless whether truncation occurs. Any ANSI escape codes in <span class="arg">ellipsis</span> are included as-is, which means it's possible for the caller to give the ellipsis string different styling from the rest of the string.</p><pre class="language-lua"><code>print(ellipsify("abcdef", 4))
-- abc…

print(ellipsify("abcdef", 4, "right", ".."))
-- ab..

print(ellipsify("abcdef", 4, "right", ""))
-- abcd

print(ellipsify("abcdef", 4, "left"))
-- …def

print(ellipsify("abcdefghijk", 8, "left", "[...]"))
-- [...]ijk

print(ellipsify("abcdefghijk", 4, "left", ""))
-- hijk

print(ellipsify("c:/abcd/wxyz", 8, "path"))
-- c:…/wxyz

print(ellipsify("c:/abcd/wxyz", 8, "path", "..."))
-- c:...xyz

print(ellipsify("c:/abcd/wxyz", 5, "path", ""))
-- c:xyz</code></pre></div></div><hr/>

<div class="function"><div class="header"> <div id="console.explodeansi" class="name"><a class="wlink" href="#console.explodeansi"><svg width=16 height=16><use href="#wicon"/></svg><span class="wfix">.</span></a><span>console.explodeansi</span> <span class="uplinks"><a href="#console">up</a> <a href="#lua-api">apis</a> <a href="#toc">top</a></span></div> <div class="signature">( <span class="arg_name">text</span>:string ) : table<br/><div class="version">v1.6.1 and newer</div></div></div><div class="body"><p class="desc">Splits <span class="arg">text</span> on ANSI escape code boundaries and returns a table containing the substrings.</p><pre class="language-lua"><code>console.explodeansi("\x1b[7mReverse\x1b[0;1mBold\x1b[m\x1b[K")
-- returns the following table:
-- {
Expand Down Expand Up @@ -8432,7 +8459,7 @@ <h5 id="rl" class="group_name"><a class="wlink" href="#rl"><svg width=16 height=

</div><div class="group">
<h5 id="rl_buffer" class="group_name"><a class="wlink" href="#rl_buffer"><svg width=16 height=16><use href="#wicon"/></svg><span class="wfix">.</span></a>rl_buffer: <span class="uplinks"><a href="#lua-api-groups">up</a> <a href="#lua-api">apis</a> <a href="#toc">top</a></span></h5>
<table class="grouplist"><tr><td><a href="#rl_buffer:beginoutput">beginoutput</a></td><td><a href="#rl_buffer:getanchor">getanchor</a></td><td><a href="#rl_buffer:getlength">getlength</a></td><td><a href="#rl_buffer:refreshline">refreshline</a></td></tr><tr><td><a href="#rl_buffer:beginundogroup">beginundogroup</a></td><td><a href="#rl_buffer:getargument">getargument</a></td><td><a href="#rl_buffer:hassuggestion">hassuggestion</a></td><td><a href="#rl_buffer:remove">remove</a></td></tr><tr><td><a href="#rl_buffer:ding">ding</a></td><td><a href="#rl_buffer:getbuffer">getbuffer</a></td><td><a href="#rl_buffer:insert">insert</a></td><td><a href="#rl_buffer:setargument">setargument</a></td></tr><tr><td><a href="#rl_buffer:endundogroup">endundogroup</a></td><td><a href="#rl_buffer:getcursor">getcursor</a></td><td><a href="#rl_buffer:insertsuggestion">insertsuggestion</a></td><td><a href="#rl_buffer:setcursor">setcursor</a></td></tr></table>
<table class="grouplist"><tr><td><a href="#rl_buffer:beginoutput">beginoutput</a></td><td><a href="#rl_buffer:getargument">getargument</a></td><td><a href="#rl_buffer:insert">insert</a></td><td><a href="#rl_buffer:setcommentrow">setcommentrow</a></td></tr><tr><td><a href="#rl_buffer:beginundogroup">beginundogroup</a></td><td><a href="#rl_buffer:getbuffer">getbuffer</a></td><td><a href="#rl_buffer:insertsuggestion">insertsuggestion</a></td><td><a href="#rl_buffer:setcursor">setcursor</a></td></tr><tr><td><a href="#rl_buffer:ding">ding</a></td><td><a href="#rl_buffer:getcursor">getcursor</a></td><td><a href="#rl_buffer:refreshline">refreshline</a></td></tr><tr><td><a href="#rl_buffer:endundogroup">endundogroup</a></td><td><a href="#rl_buffer:getlength">getlength</a></td><td><a href="#rl_buffer:remove">remove</a></td></tr><tr><td><a href="#rl_buffer:getanchor">getanchor</a></td><td><a href="#rl_buffer:hassuggestion">hassuggestion</a></td><td><a href="#rl_buffer:setargument">setargument</a></td></tr></table>
<div class="function"><div class="header"> <div id="rl_buffer:beginoutput" class="name"><a class="wlink" href="#rl_buffer:beginoutput"><svg width=16 height=16><use href="#wicon"/></svg><span class="wfix">.</span></a><span>rl_buffer:beginoutput</span> <span class="uplinks"><a href="#rl_buffer">up</a> <a href="#lua-api">apis</a> <a href="#toc">top</a></span></div> <div class="signature">() : nil<br/><div class="version">v1.1.20 and newer</div></div></div><div class="body"><p class="desc">Advances the output cursor to the next line after the Readline input buffer so that subsequent output doesn't overwrite the input buffer display.</p></div></div><hr/>

<div class="function"><div class="header"> <div id="rl_buffer:beginundogroup" class="name"><a class="wlink" href="#rl_buffer:beginundogroup"><svg width=16 height=16><use href="#wicon"/></svg><span class="wfix">.</span></a><span>rl_buffer:beginundogroup</span> <span class="uplinks"><a href="#rl_buffer">up</a> <a href="#lua-api">apis</a> <a href="#toc">top</a></span></div> <div class="signature">() : nil<br/><div class="version">v1.1.20 and newer</div></div></div><div class="body"><p class="desc">Starts a new undo group. This is useful for grouping together multiple editing actions into a single undo operation.</p></div></div><hr/>
Expand Down Expand Up @@ -8463,6 +8490,8 @@ <h5 id="rl_buffer" class="group_name"><a class="wlink" href="#rl_buffer"><svg wi

<div class="function"><div class="header"> <div id="rl_buffer:setargument" class="name"><a class="wlink" href="#rl_buffer:setargument"><svg width=16 height=16><use href="#wicon"/></svg><span class="wfix">.</span></a><span>rl_buffer:setargument</span> <span class="uplinks"><a href="#rl_buffer">up</a> <a href="#lua-api">apis</a> <a href="#toc">top</a></span></div> <div class="signature">( <span class="arg_name">argument</span>:integer | nil ) : nil<br/><div class="version">v1.2.32 and newer</div></div></div><div class="body"><p class="desc">When <span class="arg">argument</span> is a number, it is set as the numeric argument for use by Readline commands (as entered using <kbd>Alt</kbd>+Digits, etc). When <span class="arg">argument</span> is nil, the numeric argument is cleared (having no numeric argument is different from having 0 as the numeric argument).</p></div></div><hr/>

<div class="function"><div class="header"> <div id="rl_buffer:setcommentrow" class="name"><a class="wlink" href="#rl_buffer:setcommentrow"><svg width=16 height=16><use href="#wicon"/></svg><span class="wfix">.</span></a><span>rl_buffer:setcommentrow</span> <span class="uplinks"><a href="#rl_buffer">up</a> <a href="#lua-api">apis</a> <a href="#toc">top</a></span></div> <div class="signature">() : nil<br/><div class="version">v1.7.5 and newer</div></div></div><div class="body"><p class="desc">Displays the <span class="arg">text</span> in the comment row.</p></div></div><hr/>

<div class="function"><div class="header"> <div id="rl_buffer:setcursor" class="name"><a class="wlink" href="#rl_buffer:setcursor"><svg width=16 height=16><use href="#wicon"/></svg><span class="wfix">.</span></a><span>rl_buffer:setcursor</span> <span class="uplinks"><a href="#rl_buffer">up</a> <a href="#lua-api">apis</a> <a href="#toc">top</a></span></div> <div class="signature">( <span class="arg_name">cursor</span>:integer ) : integer<br/><div class="version">v1.1.20 and newer</div></div></div><div class="body"><p class="desc">Sets the cursor position in the input line and returns the previous cursor position. <span class="arg">cursor</span> can be from 1 to rl_buffer:getlength() + 1. It can exceed the length of the input line because the cursor can be positioned just past the end of the input line.</p><p class="desc"> <strong>Note:</strong> The input line is UTF8, and setting the cursor position inside a multi-byte Unicode character may have undesirable results.</p><p class="desc"> <strong>Note:</strong> In v1.1.20 through v1.6.0 this accidentally didn't return the previous cursor position. In v1.6.1 and higher it returns the the correct previous cursor position.</p></div></div><hr/>

</div><div class="group">
Expand Down Expand Up @@ -8727,6 +8756,14 @@ <h5 id="Deprecated" class="group_name"><a class="wlink" href="#Deprecated"><svg
<div class="section" id="changes">
<h1 id="changes"><a class="wlink" href="#changes"><svg width=16 height=16><use href="#wicon"/></svg><span class="wfix">.</span></a>Changes <span class="uplinks"><a href="#toc">top</a></span></h1>
<h3 id="releases-from-chrisant996clink-fork"><a class="wlink" href="#releases-from-chrisant996clink-fork"><svg width=16 height=16><use href="#wicon"/></svg><span class="wfix">.</span></a>Releases from <a href="https://github.com/chrisant996/clink">chrisant996/clink</a> fork <span class="uplinks"><a href="#changes">up</a> <a href="#toc">top</a></span></h3>
<h4 id="v175"><a class="wlink" href="#v175"><svg width=16 height=16><use href="#wicon"/></svg><span class="wfix">.</span></a>v1.7.5 <span class="uplinks"><a href="#releases-from-chrisant996clink-fork">up</a> <a href="#toc">top</a></span></h4>
<ul>
<li>Added new Lua API <a href="#console.ellipsify">console.ellipsify()</a> to truncate an input string in various ways.</li>
<li>Added new <a href="#rl_buffer:setcommentrow">rl_buffer:setcommentrow()</a> to let <a href="#luakeybindings"><code>&quot;luafunc:&quot;</code> commands</a> immediately show text in the comment row.</li>
<li>Adjusted some character width measurements based on analysis from <a href="https://github.com/chrisant996/wcwidth-verifier">wcwidth-verifier</a> on Win8.1, Win10 with conhost, Win10 with Windows Terminal 1.22, Win11 with conhost, and Win11 with Windows Terminal 1.22.</li>
<li>The Headline, Pure, and Bureau clinkprompt files now consider unpublished branches as being &quot;ahead&quot;, even in cases where git doesn&#39;t report a specific &quot;ahead by&quot; count.</li>
<li>Internal changes to the right side prompt implementation, to disentangle unnecessary internal dependencies.</li>
</ul>
<h4 id="v174"><a class="wlink" href="#v174"><svg width=16 height=16><use href="#wicon"/></svg><span class="wfix">.</span></a>v1.7.4 <span class="uplinks"><a href="#releases-from-chrisant996clink-fork">up</a> <a href="#toc">top</a></span></h4>
<ul>
<li>Changed searching for color themes and custom prompts to always include <code>themes\</code> directories under the Clink program directory and Clink profile directory, even when the <code>clink.path</code> setting has been used to remove them from the list of script directories.</li>
Expand Down

0 comments on commit bb88ece

Please sign in to comment.