summaryrefslogtreecommitdiff
path: root/eltclsh.1
blob: 038b4ea7fc1e3e14839f71001cbfd50d13e0a33b (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
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
.\"	$LAAS$ */
.\" Copyright (c) 2003,2011-2012 LAAS/CNRS                       --  Mon Jul  7 2003
.\" All rights reserved.
.\"
.\" Redistribution and use  in source  and binary  forms,  with or without
.\" modification, are permitted provided that the following conditions are
.\" met:
.\"
.\"   1. Redistributions of  source  code must retain the  above copyright
.\"      notice, this list of conditions and the following disclaimer.
.\"   2. Redistributions in binary form must reproduce the above copyright
.\"      notice,  this list of  conditions and the following disclaimer in
.\"      the  documentation  and/or  other   materials provided  with  the
.\"      distribution.
.\"
.\" THIS  SOFTWARE IS PROVIDED BY  THE  COPYRIGHT HOLDERS AND CONTRIBUTORS
.\" "AS IS" AND  ANY  EXPRESS OR IMPLIED  WARRANTIES,  INCLUDING,  BUT NOT
.\" LIMITED TO, THE IMPLIED WARRANTIES  OF MERCHANTABILITY AND FITNESS FOR
.\" A PARTICULAR  PURPOSE ARE DISCLAIMED. IN  NO EVENT SHALL THE COPYRIGHT
.\" HOLDERS OR      CONTRIBUTORS  BE LIABLE FOR   ANY    DIRECT, INDIRECT,
.\" INCIDENTAL,  SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
.\" BUT NOT LIMITED TO, PROCUREMENT OF  SUBSTITUTE GOODS OR SERVICES; LOSS
.\" OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
.\" ON ANY THEORY OF LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR
.\" TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
.\" USE   OF THIS SOFTWARE, EVEN   IF ADVISED OF   THE POSSIBILITY OF SUCH
.\" DAMAGE.
.Dd July 3, 2003
.Dt ELTCLSH 1
.Os LAAS
.Sh NAME
.Nm eltclsh
.Nd interactive tcl interpreter
.Sh SYNOPSIS
.Nm
.Op Ar filename
.Sh DESCRIPTION
.Pp
.Nm
(editline tcl shell) is an interactive shell for the TCL programming
language. It provides command line editing, history browsing as well as
variables and command completion thanks to editline features. The
completion engine is programmable in a way similar to
.Xr tcsh 1 ,
and comes
with an intelligent completion for the full tcl language by default.
.Sh SPECIAL TCL COMMANDS
eltclsh provides a few specific commands to configure interactive editing
.Bl -ohang
.It Sy el::history add Ar string
Add
.Ar string
to the history of commands.
.It Sy el::history event Ar ?event?
Returns the value of the event given by
.Ar event .
If
.Ar event
is positive, it refers to the event with that number (all events are numbered
starting at 1). If the number is negative, it selects an event relative to the
current event (-1 refers to the previous event, -2 to the one before that, and
so on). Event 0 refers to the current event.
.Ar event
defaults to -1.
.It Sy el::history change Ar ?string? ?event?
Replaces the value recorded for an event with
.Ar string .
.Ar Event
specifies the event to replace, and defaults to the current event. This
command is intended for use in commands that implement new forms of history
substitution and wish to replace the current event (which invokes the
substitution) with the command created through substitution. The return value
is an empty string.
.It Sy el::history file Ar ?filename?
Load history from
.Ar filename
and sets the filename for future saves, or return current filename. Note that
if
.Pa ~/.eltclhistory
exists and is readable it is automatically loaded at startup.
If
.Ar filename
is the empty string, history loading and saving are disabled.
.It Sy el::history save
Save history in ~/.eltclhistory by default, or in the
.Ar filename
configured by
.Sy history file .
History is automatically saved on exit.
.It Sy el::history size Ar ?length?
Set history length to
.Ar length
or return current length.
.It Sy el::history clear
Erase the history list. The current keep limit is retained.
.El
.Sh SEE ALSO
.Xr tclsh 1 .