source: vis_dev/vis-2.3/share/help/historyCmd.txt @ 82

Last change on this file since 82 was 14, checked in by cecile, 13 years ago

vis2.3

File size: 2.1 KB
Line 
1
2  history - list previous commands and their event numbers
3     _________________________________________________________________
4
5   history [-h] [<num>]
6
7   Lists previous commands and their event numbers. This is a UNIX-like history
8   mechanism inside the VIS shell.
9
10   Command options:
11
12   -h
13          Print the command usage.
14
15   <num>
16          Lists the last <num> events. Lists the last 30 events if <num> is not
17          specified.
18
19   History Substitution:
20
21   The history substitution mechanism is a simpler version of the csh history
22   substitution mechanism. It enables you to reuse words from previously typed
23   commands.
24
25   The default history substitution character is the `%' (`!' is default for
26   shell  escapes, and `#' marks the beginning of a comment). This can be
27   changed using the "set" command. In this description '%' is used as the
28   history_char. The `%' can appear anywhere in a line. A line containing a
29   history substitution is echoed to the screen after the substitution takes
30   place. `%' can be preceded by a `\' in order to escape the substitution, for
31   example, to enter a `%' into an alias or to set the prompt.
32
33   Each valid line typed at the prompt is saved. If the "history" variable is
34   set (see help page for "set"), each line is also echoed to the history file.
35   You can use the "history" command to list the previously typed commands.
36
37   Substitutions:
38
39   At any point in a line these history substitutions are available.
40
41   %:0
42          Initial word of last command.
43
44   %:n
45          n-th argument of last command.
46
47   %$
48          Last argument of last command.
49
50   %*
51          All but initial word of last command.
52
53   %%
54          Last command.
55
56   %stuf
57          Last command beginning with "stuf".
58
59   %n
60          Repeat the n-th command.
61
62   %-n
63          Repeat the n-th previous command.
64
65   ^old^new
66          Replace "old" with "new" in previous command. Trailing spaces are
67          significant during substitution. Initial spaces are not significant.
68     _________________________________________________________________
69
70   Last updated on 20100410 00h02
Note: See TracBrowser for help on using the repository browser.