aboutsummaryrefslogtreecommitdiff
path: root/repl.1
blob: 1c704cc0ea63f15a6107932babc2780ceb26e087 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
.Dd $Mdocdate$
.Dt REPL 1
.Os
.Sh NAME
.Nm repl
.Nd create a REPL out of any command
.\"
.Sh SYNPOSIS
.Nm repl
.Op Fl a
.Ar command
.\"
.Sh DESCRIPTION
When invoked, the
.Nm repl
utility puts the user in a read-eval-print loop, in which it reads
input from the user, appends it to the
.Ar command
provided by the single argument, and lets the shell evaluate the
full string.

If the
.Fl a
flag is provided,
.Ar command
will be used as a suffix instead of a prefix.
Built on GNU readline,
.Nm
supports history and Emacs key bindings.

Like in many other line-based UNIX interfaces,
you can execute a shell command without a prefix
by adding an exclamation mark before it.

.Nm repl
is useful for command-line interfaces built on a 
.Dq prefix command
that has to be typed over and over preceding the actual command, like
.Xr git 1 .
.\"
.Sh EXAMPLES
.Dl $ repl git
.Dl git > status
.Dl On branch master
.Dl Your branch is up to date with 'origin/master'.
.Dl git > 
.\"
.Sh AUTHORS
.Nm repl
is written by
.An John Ankarström ,
available {on the web|by e-mail} at john{.|@}ankarstrom.se.