uTools-Manuals/docs/php/readline_completion_function.html
2019-04-08 23:22:26 +08:00

59 lines
2.0 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>注册一个完成函数</title>
</head>
<body class="docs"><div id="layout">
<div id="layout-content"><div id="function.readline-completion-function" class="refentry">
<div class="refnamediv">
<h1 class="refname">readline_completion_function</h1>
<p class="verinfo">(PHP 4, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">readline_completion_function</span> &mdash; <span class="dc-title">注册一个完成函数</span></p>
</div>
<div class="refsect1 description" id="refsect1-function.readline-completion-function-description">
<h3 class="title">说明</h3>
<div class="methodsynopsis dc-description">
<span class="methodname"><strong>readline_completion_function</strong></span>
( <span class="methodparam"><span class="type"><a href="language.types.callable.html" class="type callable">callable</a></span> <code class="parameter">$function</code></span>
) : <span class="type">bool</span></div>
<p class="para rdfs-comment">
这个函数注册一个完成函数.这就像你在使用 Bash 时按 tab 键时你想要的功能一样
</p>
</div>
<div class="refsect1 parameters" id="refsect1-function.readline-completion-function-parameters">
<h3 class="title">参数</h3>
<p class="para">
<dl>
<dt>
<code class="parameter">function</code></dt>
<dd>
<p class="para">
你必须提供一个已经存在的函数的名字并且可以接受命令行中的部分输入
然后返回一些可能匹配的数组.
</p>
</dd>
</dl>
</p>
</div>
<div class="refsect1 returnvalues" id="refsect1-function.readline-completion-function-returnvalues">
<h3 class="title">返回值</h3>
<p class="para">
成功时返回 <strong><code>TRUE</code></strong> 或者在失败时返回 <strong><code>FALSE</code></strong>
</p>
</div>
</div></div></div></body></html>