short for | : | readline wrapper |
是什么 ? | : | a small utility that uses the GNU readline to allow the editing of keyboard input for any command. |
开发语言 | : | C |
源码仓库 | : | https://github.com/hanslub42/rlwrap |
操作系统 | 包管理器 | 安装命令 |
---|---|---|
macOS | HomeBrew | brew install rlwrap |
GNU/Linux | HomeBrew | brew install rlwrap |
apt | sudo apt-get install -y rlwrap | |
CentOS | yum | sudo yum install -y rlwrap |
dnf | sudo dnf install -y rlwrap | |
openSUSE | zypper | sudo zypper install -y rlwrap |
Alpine Linux | apk | sudo apk add rlwrap |
pacman | sudo pacman -Syyu --noconfirm | |
Gentoo Linux | Portage | sudo emerge rlwrap |
rlwrap
命令的使用格式如下:
rlwrap [option]... <COMMAND> [ARGUMENT]...
示例:
rlwrap -a -- -c -i -f ~/.rlwrap/sqlite3_completions sqlite3
-f FILE
指定自动补全的关键字文件。这里是自动补全sqlite3 shell中的命令和SQL
语句。
mkdir ~/.rlwrap
echo '.help' | sqlite3 | grep -o '^\.[a-z]* ' >> ~/.rlwrap/sqlite3_completions
echo 'ABORT ACTION ADD AFTER ALL ALTER ANALYZE AND AS ASC ATTACH AUTOINCREMENT BEFORE BEGIN BETWEEN BY CASCADE CASE CAST CHECK COLLATE COLUMN COMMIT CONFLICT CONSTRAINT CREATE CROSS CURRENT_DATE CURRENT_TIME CURRENT_TIMESTAMP DATABASE DEFAULT DEFERRABLE DEFERRED DELETE DESC DETACH DISTINCT DROP EACH ELSE END ESCAPE EXCEPT EXCLUSIVE EXISTS EXPLAIN FAIL FOR FOREIGN FROM FULL GLOB GROUP HAVING IF IGNORE IMMEDIATE IN INDEX INDEXED INITIALLY INNER INSERT INSTEAD INTERSECT INTO IS ISNULL JOIN KEY LEFT LIKE LIMIT MATCH NATURAL NO NOT NOTNULL NULL OF OFFSET ON OR ORDER OUTER PLAN PRAGMA PRIMARY QUERY RAISE RECURSIVE REFERENCES REGEXP REINDEX RELEASE RENAME REPLACE RESTRICT RIGHT ROLLBACK ROW SAVEPOINT SELECT SET TABLE TEMP TEMPORARY THEN TO TRANSACTION TRIGGER UNION UNIQUE UPDATE USING VACUUM VALUES VIEW VIRTUAL WHEN WHERE WITH WITHOUT' >> ~/.rlwrap/sqlite3_completions