-
Notifications
You must be signed in to change notification settings - Fork 4
/
undo.1
71 lines (70 loc) · 1.47 KB
/
undo.1
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
.TH UNDO 1 "Jul 09, 2012" "undo user manual"
.SH NAME
.PP
undo - undo shell commands
.SH SYNOPSIS
.PP
undo [-i|-p] command [arguments ...]
.IP
.nf
\f[C]
-i\ \ \ confirm\ before\ executing
-p\ \ \ only\ print\ the\ reverse\ command
\f[]
.fi
.SH DESCRIPTION
.PP
Undo generates and executes reverse commands according to the command
passed in.
.SS EXAMPLES
.IP
.nf
\f[C]
#\ 1.\ With\ help\ from\ history\ substitution
undo\ !!
undo\ !-2
undo\ -i\ !tar
#\ 2.\ With\ help\ from\ command\ history
#\ Use\ your\ favorite\ way\ to\ navigate\ to\ the\ target\ command
#\ Insert\ "undo"\ in\ front\ of\ the\ target\ command
#\ Hit\ enter
\f[]
.fi
.SS NOTES
.PP
Undo supports or partially supports the following commands:
.IP
.nf
\f[C]
cp\ mv\ mkdir\ rmdir\ tar\ git\ gzip\ gunzip
\f[]
.fi
.PP
Undo \f[I]cannot\f[] undo commands that does not have reverse commands.
.PP
Undo must be called in the same directory the target command was
executed.
.PP
Undo \f[I]does not\f[] and \f[I]cannot\f[] access your shell command
history.
You should use history functionalities provided by your shell to pass
the target command to undo.
.PP
Undo sources undo recipes from "/etc/undo_recipes" or
"$HOME/undo_recipes" if found.
.PP
Undo is alpha software, it is suggested that you use the below alias:
.IP
.nf
\f[C]
alias\ undo=\[aq]undo\ -i\[aq]
\f[]
.fi
.SH CONTRIBUTING
.PP
Undo is hosted on GitHub: https://github.com/clvv/undo
.SH COPYING
.PP
Undo is licensed under the "MIT/X11" license.
.SH AUTHORS
Wei Dai <[email protected]>.