#compdef rlwrap

_rlwrap() {
  _arguments -C \
    {-a,--always-readline}'[Always remain in "readline mode" (see below)]' \
    {-A,--ansi-colour-aware}'[Prompts that use colour, or use other CSI codes to e. g]' \
    {-b,--break-chars}'[Consider the specified characters word-breaking]' \
    {-c,--complete-filenames}'[Complete filenames]' \
    {-C,--command-name}'[Use command_name instead of command to determine the names]' \
    {-D,--history-no-dupes}'[How aggressively to weed out duplicate entries from the input history]' \
    {-e,--extra-char-after-completion}'[By default, rlwrap appends a space after any inserted completion text]' \
    {-E,--always-echo}'[By default, rlwrap avoids displaying passwords by echoing]' \
    {-f,--file}'[Split file into words (using the default word-breaking characters]' \
    {-g,--forget-matching}'[Forget (i. e]' \
    {-h,--help}'[Print a short help message]' \
    {-H,--history-filename}'[Read command history from file (and write it back there if --histsize >= 0)]' \
    {-i,--case-insensitive}'[Ignore case when completing (filename completion remains case-sensitive)]' \
    {-I,--pass-sigint-as-sigterm}'[Send a TERM signal to command when an INT is received (e. g]' \
    {-l,--logfile}'[When in readline mode, append command'"'"'s output (including echo'"'"'ed user input)]' \
    {-m,--multi-line}'[Enable multi-line input using a "newline substitute" character sequence]' \
    {-M,--multi-line-ext}'[Call multi-line-editor on temporary files with filename extension]' \
    {-n,--no-warnings}'[Don'"'"'t print warnings]' \
    {-N,--no-children}'[When rlwrap is invoked with the --always-readline option, editors and pagers]' \
    {-o,--one-shot}'[Send an EOF to command after accepting the first line of input]' \
    {-O,--only-cook}'[Only ever "cook" prompts that match regexp, which can be preceded by '"'"'!'"'"']' \
    {-p,--prompt-colour}'[Use one of the colour names black, red, green, yellow, blue, cyan, purple]' \
    {-P,--pre-given}'[Start rlwrap with text in its edit buffer (this will automatically set the --]' \
    {-q,--quote-characters}'[Assume that the given characters act as quotes, e. g]' \
    {-r,--remember}'[Put all words seen on in- and output on the completion list]' \
    {-R,--renice}'[Make rlwrap nicer than command (cf nice (1))]' \
    {-s,--histsize}'[Limit the history list to N entries, truncating the history file (default: 300]' \
    {-S,--substitute-prompt}'[Substitute the specified prompt for command'"'"'s own prompt]' \
    {-t,--set-terminal-name}'[Set command'"'"'s TERM to name]' \
    {-U,--mirror-arguments}'[(linux only) Keep track of command'"'"'s arguments as seen by the ps (1) command]' \
    {-v,--version}'[Print rlwrap version]' \
    {-w,--wait-before-prompt}'[In order to determine if command'"'"'s last output is a prompt, rlwrap waits timeout ms (default: 40ms)]' \
    {-W,--polling}'[Wake up every timeout millisecs, where timeout is the same as for -w option]' \
    {-X,--skip_setctty}'[Don'"'"'t create a new session for command]' \
    '*:file:_files'
}

_rlwrap
