|
3 | 3 |
|
4 | 4 | <!-- ----------------------------------------------------- -->
|
5 | 5 | <head>
|
6 |
| -<title>Clink v1.7.11</title> |
| 6 | +<title>Clink v1.7.12</title> |
7 | 7 | <style>
|
8 | 8 | @import url('https://fonts.googleapis.com/css2?family=Rambla:wght@400;700&family=Roboto&family=Fira+Mono&display=swap');
|
9 | 9 | html {
|
|
954 | 954 | </td>
|
955 | 955 | <td style="text-align:right">
|
956 | 956 | <div id="header">
|
957 |
| - <div id="title">Clink v1.7.11</div> |
| 957 | + <div id="title">Clink v1.7.12</div> |
958 | 958 | <div id="branch"></div>
|
959 | 959 | <div id="url">
|
960 | 960 | <a href="https://github.com/chrisant996/clink">
|
@@ -7781,7 +7781,7 @@ <h5 id="io" class="group_name"><a class="wlink" href="#io"><svg width=16 height=
|
7781 | 7781 | end
|
7782 | 7782 | r:close()</code></pre></div></div><hr/>
|
7783 | 7783 |
|
7784 |
| -<div class="function"><div class="header"> <div id="io.popenyield" class="name"><a class="wlink" href="#io.popenyield"><svg width=16 height=16><use href="#wicon"/></svg><span class="wfix">.</span></a><span>io.popenyield</span> <span class="uplinks"><a href="#io">up</a> <a href="#lua-api">apis</a> <a href="#toc">top</a></span></div> <div class="signature">( <span class="arg_name">command</span>:string, [<span class="arg_name">mode</span>:string] ) : file, function (see remarks below)<br/><div class="version">v1.2.10 and newer</div></div></div><div class="body"><p class="desc">This behaves similar to <a href="https://www.lua.org/manual/5.2/manual.html#pdf-io.popen">io.popen()</a> except that it only supports read mode and when used in a coroutine it yields until the command has finished.</p><p class="desc"> The <span class="arg">command</span> argument is the command to run.</p><p class="desc"> The <span class="arg">mode</span> argument is the optional mode to use. It can contain "r" (read mode) and/or either "t" for text mode (the default if omitted) or "b" for binary mode. Write mode is not supported, so it cannot contain "w".</p><p class="desc"> This runs the specified command and returns a read file handle for reading output from the command. It yields until the command has finished and the complete output is ready to be read without blocking.</p><p class="desc"> In v1.3.31 and higher, it may also return a function. If the second return value is a function then it can be used to get the exit status for the command. The function returns the same values as <a href="https://www.lua.org/manual/5.2/manual.html#pdf-os.execute">os.execute()</a>. The function may be used only once, and it closes the read file handle, so if the function is used then do not use <code>file:close()</code>. Or, if the second return value is not a function, then the exit status may be retrieved from calling <code>file:close()</code> on the returned file handle.</p><p class="desc"> <strong>Compatibility Note:</strong> when <code>io.popen()</code> is used in a coroutine, it is automatically redirected to <code>io.popenyield()</code>. This means on success the second return value from <code>io.popen()</code> in a coroutine may not be nil as callers might normally expect.</p><p class="desc"> <strong>Note:</strong> if the <code><a href="#prompt_async">prompt.async</a></code> setting is disabled, or while a <a href="#transientprompts">transient prompt filter</a> is executing, or if used outside of a coroutine, then this behaves like <a href="https://www.lua.org/manual/5.2/manual.html#pdf-io.popen">io.popen()</a> instead.</p><pre class="language-lua"><code>local file = io.popenyield("git status") |
| 7784 | +<div class="function"><div class="header"> <div id="io.popenyield" class="name"><a class="wlink" href="#io.popenyield"><svg width=16 height=16><use href="#wicon"/></svg><span class="wfix">.</span></a><span>io.popenyield</span> <span class="uplinks"><a href="#io">up</a> <a href="#lua-api">apis</a> <a href="#toc">top</a></span></div> <div class="signature">( <span class="arg_name">command</span>:string, [<span class="arg_name">mode</span>:string] ) : file, function (see remarks below)<br/><div class="version">v1.2.10 and newer</div></div></div><div class="body"><p class="desc">This behaves similar to <a href="https://www.lua.org/manual/5.2/manual.html#pdf-io.popen">io.popen()</a> except that it only supports read mode and when used in a coroutine it yields until the command has finished.</p><p class="desc"> The <span class="arg">command</span> argument is the command to run.</p><p class="desc"> The <span class="arg">mode</span> argument is the optional mode to use. It can contain "r" (read mode) and/or either "t" for text mode (the default if omitted) or "b" for binary mode. Write mode is not supported, so it cannot contain "w".</p><p class="desc"> This runs the specified command and returns a read file handle for reading output from the command. It yields until the command has finished and the complete output is ready to be read without blocking.</p><p class="desc"> In v1.3.31 and higher, it may also return a function. If the second return value is a function then it can be used to get the exit status for the command. The function returns the same values as <a href="https://www.lua.org/manual/5.2/manual.html#pdf-os.execute">os.execute()</a>. The function may be used only once, and it closes the read file handle, so if the function is used then do not use <code>file:close()</code>. Or, if the second return value is not a function, then the exit status may be retrieved from calling <code>file:close()</code> on the returned file handle.</p><p class="desc"> In v1.7.12 and higher, if an error occurs then the function returns nil, an error message string, and an error code.</p><p class="desc"> <strong>Compatibility Note:</strong> when <code>io.popen()</code> is used in a coroutine, it is automatically redirected to <code>io.popenyield()</code>. This means on success the second return value from <code>io.popen()</code> in a coroutine may not be nil as callers might normally expect.</p><p class="desc"> <strong>Note:</strong> if the <code><a href="#prompt_async">prompt.async</a></code> setting is disabled, or while a <a href="#transientprompts">transient prompt filter</a> is executing, or if used outside of a coroutine, then this behaves like <a href="https://www.lua.org/manual/5.2/manual.html#pdf-io.popen">io.popen()</a> instead.</p><pre class="language-lua"><code>local file = io.popenyield("git status") |
7785 | 7785 |
|
7786 | 7786 | while (true) do
|
7787 | 7787 | local line = file:read("*line")
|
@@ -8763,6 +8763,11 @@ <h5 id="Deprecated" class="group_name"><a class="wlink" href="#Deprecated"><svg
|
8763 | 8763 | <div class="section" id="changes">
|
8764 | 8764 | <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>
|
8765 | 8765 | <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>
|
| 8766 | +<h4 id="v1712"><a class="wlink" href="#v1712"><svg width=16 height=16><use href="#wicon"/></svg><span class="wfix">.</span></a>v1.7.12 <span class="uplinks"><a href="#releases-from-chrisant996clink-fork">up</a> <a href="#toc">top</a></span></h4> |
| 8767 | +<ul> |
| 8768 | +<li>Fixed what <code>io.popenyield()</code> returns upon failure; previously it accidentally only returned nil, and now upon failure it returns the usual values (nil, error message, error code).</li> |
| 8769 | +<li>Fixed <a href="https://github.com/chrisant996/clink/issues/727">#727</a>; custom prompts can crash Clink when <code>cd</code> into a path that exceeds MAX_PATH length.</li> |
| 8770 | +</ul> |
8766 | 8771 | <h4 id="v1711"><a class="wlink" href="#v1711"><svg width=16 height=16><use href="#wicon"/></svg><span class="wfix">.</span></a>v1.7.11 <span class="uplinks"><a href="#releases-from-chrisant996clink-fork">up</a> <a href="#toc">top</a></span></h4>
|
8767 | 8772 | <ul>
|
8768 | 8773 | <li>Changed the <code>clink-diagnostics-output</code> bindable command to include a list of the current Clink settings.</li>
|
|
0 commit comments