-
Notifications
You must be signed in to change notification settings - Fork 1
/
z.1
84 lines (72 loc) · 1.89 KB
/
z.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
72
73
74
75
76
77
78
79
80
81
82
83
84
.TH Z "1" "February 2011" "z" "User Commands"
.SH NAME
z \- jump around
.SH SYNOPSIS
z [\-h] [\-l] [\-r] [\-t] [regex1 regex2 ... regexn]
.SH AVAILABILITY
bash, zsh
.SH DESCRIPTION
Tracks your most used directories, based on 'frecency'.
.P
After a short learning phase, \fBz\fR will take you to the most 'frecent'
directory that matches ALL of the regexes given on the command line.
.SH OPTIONS
\fB\-h\fR show a brief help message
.br
\fB\-l\fR list only
.br
\fB\-r\fR match by rank only
.br
\fB\-t\fR match by recent access only
.SH EXAMPLES
\fBz foo\fR cd to most frecent dir matching foo
.br
\fBz foo bar\fR cd to most frecent dir matching foo and bar
.br
\fBz -r foo\fR cd to highest ranked dir matching foo
.br
\fBz -t foo\fR cd to most recently accessed dir matching foo
.br
\fBz -l foo\fR list all dirs matching foo (by frecency)
.SH NOTES
\fBInstallation:\fR
.P
optionally:
set \fB$_Z_CMD\fR in .bashrc/.zshrc to change the command (default \fBz\fR).
.P
put something like this in your \fB$HOME/.bashrc\fR:
.P
\fB. /path/to/z.sh\fR
.P
put something like this in your \fB$HOME/.zshrc\fR:
.P
\fB. /path/to/z.sh
function precmd () {
_z --add "$(pwd -P)"
}\fR
.P
\fBcd\fR around for a while to build up the db.
.P
PROFIT!!
.br
\fBFrecency:\fR
.P
Frecency is a portmantaeu of 'recent' and 'frequency'. It is a weighted rank
that depends on how often and how recently something occured. As far as I
know, Mozilla came up with the term.
.P
In \fBz\fR, a directory that has low ranking but has been accessed recently
will quickly have higher rank than a directory accessed frequently a long time
ago.
.br
.SH ENVIRONMENT
A function \fB_z()\fR is defined.
.P
An alias \fB$_Z_CMD\fR='_z 2>&1' is defined. If not set, \fB$_Z_CMD\fR defaults
to \fBz\fR.
.SH FILES
data is stored in \fB$HOME/.z\fR
.SH SEE ALSO
regex(7), cdargs, pushd, popd, autojump, cdargs
.P
Please file bugs at https://github.com/rupa/z/