Coder Social home page Coder Social logo

rrthomas / rlwrap Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hanslub42/rlwrap

0.0 3.0 0.0 665 KB

A readline wrapper

License: GNU General Public License v2.0

Makefile 0.55% M4 4.20% Perl 17.58% Python 9.54% C 65.34% Ruby 2.59% Shell 0.20%

rlwrap's Introduction

rlwrap v 0.43  July 19 2016

* WHAT IT IS: 

rlwrap is a 'readline wrapper', a small utility that uses the GNU
readline library to allow the editing of keyboard input for any
command. I couldn't find anything like it when I needed it, so I wrote
this one back in 1999.  By now, there are (and, in hindsight, even
then there were) a number of good readline wrappers around, like rlfe,
distributed as part of the GNU readline library, and the amazing socat
(http://freecode.com/projects/socat). You should consider rlwrap 
especially when you need user-defined completion (by way of completion word
lists) and persistent history, or if you want to program 'special
effects' using the filter mechanism. rlwrap compiles and runs on a 
fairly wide range of Unix-like systems.

* HOW TO USE IT:
If 

  $ <command> <args>

doesn't let you use arrow keys to edit input, or if you just want
decent input history and completion, try:

  $ rlwrap [-options] <command> <args>

You then can edit <command>'s input and recall the input history using
the arrow keys.  Input history is remembered accross invocations,
separately for different <command>s. Typing !<prefix><TAB> will recall
the last input line starting with <prefix>, CTRL-R will search the
input history.  With the -r and -f options you can specify the list of
words which rlwrap will use as possible completions, taking them from a 
file (-f option) or from <command>'s standard in/output.
rlwrap monitors <command>'s terminal settings, so that it can do the
right thing when command asks for single keypresses or for a password.
Commands that already use readline will always ask for (and get)
single keypresses, which makes rlwrapping them rather
pointless. However, if one uses the -a option, rlwrap will use its own
line editing and history. Unforunately, in this case, rlwrap cannot
detect whether <command> asks for a password. This can be remedied by
giving the password prompt (excluding trailing space and possibly the
first few letters) as an argument to the -a option.
 
* EXAMPLES:
Run netcat with command-line editing:

  rlwrap nc localhost 80

Run lprolog and use library1 and library2 to build a completion word
list:
  
  rlwrap -f library1 -f library2 lprolog

Run smbclient (which already uses readline), add all input and output
to completion list, complete local filenames, avoid showing (and
storing) passwords:

  rlwrap -cr -aPassword: smbclient '\\PEANUT\C' 

* INSTALLATION:
Usually just

# ./configure; make install

See the INSTALL file for more information.

* PARENTHESIS MATCHING 
This can be controlled by putting "set blink-matching-paren (off|on)"
in your .inputrc. This setting is mentioned, but not clearly
documented in readline's info or manpages; it should be on by default.

* FILTERS 
Filters are "plug-in" scripts that give you complete control
over rlwrap's input and output, history and completion. They are 
somewhat experimental, and their implementation and the example
filters still are of slightly dubious ('alpha') quality.

* AUTHOR
Hans Lub, [email protected]

* HOMEPAGE
https://github.com/hanslub42/rlwrap

rlwrap's People

Contributors

hanslub42 avatar hokuda avatar haguenau avatar davidfetter avatar mtmiller avatar avivace avatar jasonm avatar michael-cook-bose avatar rrthomas avatar rjkroege avatar

Watchers

 avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.