Linux command
rlwrap 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Add readline to command
rlwrap [command]
With history file
rlwrap -H [~/.command_history] [command]
With completion file
rlwrap -f [completions.txt] [command]
Always readline
rlwrap -a [command]
Remember multi-line input
rlwrap -m [command]
Quote special characters
rlwrap -q '"' [command]
Case-insensitive completion
rlwrap -i [command]
说明
rlwrap adds readline capabilities to any command. It provides line editing, history, and completion for programs that lack them. History persists across sessions when using -H. Previous inputs are searchable with Ctrl-R. Arrow keys navigate history. Completion files contain words for Tab completion. The -r option learns words from output, building dynamic completions. Multi-line mode handles commands spanning multiple lines. This is useful for SQL clients and REPLs that accept multi-line input. The tool intercepts input, processes it through readline, then passes it to the wrapped command. Output passes through unchanged. Prompts are detected and colorized. This improves visibility in interactive sessions.
参数
- -a, --always-readline
- Always use readline.
- -H _FILE_
- History file.
- -f _FILE_
- Completions file.
- -i, --case-insensitive
- Case-insensitive completion.
- -m _CHAR_
- Multi-line mode.
- -q _CHAR_
- Quote character.
- -c, --complete-filenames
- Complete filenames.
- -r, --remember
- Remember input for completion.
- -p _PROMPT_
- Prompt color.
- -b _CHARS_
- Word break characters.
- -s _N_
- History size.
- --no-warnings
- Suppress warnings.
FAQ
What is the rlwrap command used for?
rlwrap adds readline capabilities to any command. It provides line editing, history, and completion for programs that lack them. History persists across sessions when using -H. Previous inputs are searchable with Ctrl-R. Arrow keys navigate history. Completion files contain words for Tab completion. The -r option learns words from output, building dynamic completions. Multi-line mode handles commands spanning multiple lines. This is useful for SQL clients and REPLs that accept multi-line input. The tool intercepts input, processes it through readline, then passes it to the wrapped command. Output passes through unchanged. Prompts are detected and colorized. This improves visibility in interactive sessions.
How do I run a basic rlwrap example?
Run `rlwrap [command]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -a, --always-readline do in rlwrap?
Always use readline.