连接到Archelonc以获取Web外壳历史记录的客户端
archelonc的Python项目详细描述
基于游标的命令历史应用程序,可以连接到 用于跨多个主机共享shell历史的web服务器(archelond)。
安装
pip install archelonc
设置好后,您可以通过运行. archelonthis来尝试 使用现有的shell历史记录让您试用客户端。到 使此工作更像通过C-ri进行的bash反向历史搜索 建议添加:
bind'"\033a":". archelon\n"'
这将通过Alt-A启动Archelon的反向搜索。
启用Web的历史记录
从这里你可以使用Archelon原样,但酷的部分真的开始了 当您安装archelond并连接客户端以使用该项目时 用于共享和索引shell历史记录。配置客户端 安装服务器后,只需添加两个环境 混合变量。
- ARCHELON_URL-指向Archelond安装的Web URL
- ARCHELON_TOKEN-用户的api令牌。你可以得到这个 通过转到https://your.archelond.domain/api/v1/token并使用 您创建的用户名和密码。
将它们添加到.bashrc、.profile或任何启动shell的 正在使用,它将连接到Web服务器。你可以验证 这并通过运行^{tt7}填充您的web历史记录$ 将导入当前计算机历史记录的命令。
键盘快捷键
在client curses应用程序中,有几个方便的键盘快捷键。
Alt-o: | This presses the Ok button and runs whatever command is in the ^{tt8}$ field. |
---|---|
Alt-c: | This presses the cancel button and exits out of the application without running a command. ^{tt9}$ also works, but currently has a nasty exception message. |
Ctrl-x: | This brings up the menu for doing things like changing the order of the search results. |