文字

GNU Readline

  • 简介
  • 安装/配置
    • 需求
    • 安装
    • 运行时配置
    • 资源类型
  • 预定义常量
  • Readline 函数
    • readline_add_history — 添加一行命令行历史记录
    • readline_callback_handler_install — 初始化一个 readline 回调接口,然后终端输出提示信息并立即返回
    • readline_callback_handler_remove — 移除上一个安装的回调函数句柄并且恢复终端设置
    • readline_callback_read_char — 当一个行被接收时读取一个字符并且通知 readline 调用回调函数
    • readline_clear_history — 清除历史
    • readline_completion_function — 注册一个完成函数
    • readline_info — 获取/设置readline内部的各个变量
    • readline_list_history — 获取命令历史列表
    • readline_on_new_line — 通知readline将光标移动到新行
    • readline_read_history — 读取命令历史
    • readline_redisplay — 重绘显示区
    • readline_write_history — 写入历史记录
    • readline — 读取一行

用户评论:

[#1] list2011 at lunch dot za dot net [2012-02-02 10:11:54]

When readline is enabled, php switches the terminal mode to accept line-buffered input.  This means that the proper way to use the cli when you pipe to an interactive command is to explicitly specify that php is not using the terminal for input:

php somescript.php < /dev/null | less

上一篇: 下一篇: