source: vis_dev/vis-2.1/share/vis/help/historyCmd.txt @ 11

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

Add vis

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