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 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131
|
.de EX \"Begin example
.ne 5
.if n .sp 1
.if t .sp .5
.nf
.in +.5i
\fC
..
.de EE
.fi
.in -.5i
.if n .sp 1
.if t .sp .5
\fR
..
.TH cle 1 "October 1999"
.SH NAME
\fBcle\fP \- \fBC\fRommand \fBL\fRine \fBE\fRditor
.SH SYNOPSYS
\fBcle\fP [options] <program> [\fB<arguments>\fP]
.SH DESCRIPTION
Cle is a Command Line Editor. It provides the
editing/history/completion commands of the \fBreadline(3)\fR package
to any line-oriented Unix command. For instance,
.EX
$ cle sftp foo.bar.org
.EE
provides editing/history/completion commands to the sftp command.
.LP
Since most modern shells allow you to define aliases, you can define
a simple alias such as
.EX
$ alias sftp="cle \\sftp" (bash or zsh syntax)
.EE
or
.EX
$ alias sftp cle sftp (tcsh or csh syntax)
.EE
to always uses cle with the sftp command.
.SH OPTIONS
The following options are recognized by \fBcle\fR:
.TP
\fB\-v\fR, \fB\-\-version\fR
output version information and exit.
.TP
\fB\-s\fR N, \fB--size=\fRN
set the size of the history to
.RI abs( n )
lines.
(I.e. to \fIn\fR lines,
or to \-\fIn\fR lines if \fIn\fR is negative.)
.br
If \fIn\fR > 0 then the history is saved to
.RI ~/. APP _history,
where
.I APP
is the basename of the program being run.
.br
If n is 0, then the history file is removed.
.br
If n is negative, then the history file is neither read nor written.
.br
The default size is 100.
.SH FILES
.IP \fI~/.inputrc\fR
Since cle uses the readline package, it can be customized by the file
"~/.inputrc". When cle is run it initializes the readline package and
gives it the name of the application it controls. This can be used to
define different bindings for different commands. An example is given
below:
.EX
$if sftp
"\\C-xl": "dir\\C-m"
$endif
$if stk
"\\C-xl": "(system \\"ls -ls\\")\\C-m"
$endif
$if ed
"\\C-x-l": "!ls -l\\C-m"
$endif
.EE
See the file "src/sample-inputrc" file for a more complete example.
See also standard readline documentation package for details on the
available "bindable" functions and on the format of this file.
.br
\fIPARENTHESIS FLASHING\fR
.br
The readline version compiled with \fBcle\fR uses parentheses flashing
(i.e when you type a closing parenthesis, the corresponding opening
parenthesis flashes). Rebind the closing parentheses is with
"self-insert" to get rid of this feature.
.br
Example:
.EX
$if sftp
")": self-insert
"]": self-insert
"}": self-insert
$end
.EE
.IP \fI~/.XXX_history\fR
When a cle'ed application leaves, the state of the history is saved in
a file whose name is ~/.XXX_history, where XXX is the name of the
application. If the size is of the history is 0, the history file
is deleted. This avoids the accumulation of file in the
user home directory.
.SH BUGS
It doesn't work well with applications that try to read from the tty
directly, instead of reading from their standard input, like ssh or
ftp when waiting for entry of a password.
If the program being launched has a prompt, pressing C-a will visually
bring the cursor at the very left of the terminal, before the prompt,
but will behave as if placed after the prompt, which can be confusing.
.SH SEE ALSO
readline(3)
|