Autojump2

Autojump2 Git Source Tree

Root/README

1INTRODUCTION
2
3Autojump2 is a fork of Autojump originaly written by Joel Schaerer (https://github.com/joelthelion/autojump).
4The philosophy is different from Autojump. Autojump use "j" command and increment a number after each call.
5In opposite, Autojump2 is a replacement of "cd" command. "cd" behaviour is enhanced by intelligent completion and
6short links to your favorite directories.
7* Personal opinion *
8Another thing is that the code is simpler than Autojump2, completion is smarter, database management is better.
9
10Regular expressions.
11Autojump2 use two regular expressions constructed with arguments, "cd a b c" is translated in :
12- .*/.*a.*b.*c.* # All arguments define last directory name
13- .*/.*a.*/.*b.*/.*c.* # Arguments are part of path
14So you can address complex paths with multiple arguments.
15
16
17LICENCE
18
19Autojump2 (like autojump) is under GPL version 3 licence.
20
21
22INSTALLATION
23
24No script is delivered because installation is simple.
25
26Local installation :
27- Copy whole package content in ~/.local/share/autojump2
28- Create a symbolic link from a bin directory (/bin, /usr/bin, ...) to ~/.local/share/autojump2/autojump2
29- Add 'source ~/.local/share/autojump2/autojump2.bash' to your ~/.bashrc
30- Add 'alias cd="j"' to your ~/.bashrc
31
32Bin installation
33- Copy whole package content in /usr/local/share/autojump2
34- Create a symbolic link from a bin directory (/bin, /usr/bin, ...) to /usr/local/share/autojump2/autojump2
35- Add 'source /usr/local/share/autojump2/autojump2.bash' to your ~/.bashrc
36- Add 'alias cd="j"' to your ~/.bashrc
37
38A database named .autojump2.dict will be created at $AUTOJUMP2_DATA_DIR/ or ~/ if variable is not defined
39
40
41USAGE
42
43Example directory hierarchy :
44proj
45 |--- v1/
46 |--- v2/
47 |--- v3/
48 |--- branch/
49 |--- v2/
50
51
52First, add your favorite directories to autojump2 database :
53
54cd --add proj/v2
55>>> '/home/soutade/proj/v2' correctly added to database
56cd -a proj/v1
57>>> '/home/soutade/proj/v1' correctly added to database
58cd -a proj/\\*
59>>> '/home/soutade/proj/*' correctly added to database
60cd --add proj/branch/v2
61>>> '/home/soutade/proj/branch/v2' correctly added to database
62
63If you specify a star in pathname, the directory will be recursively walked
64to find directories. You can specify more than one star.
65
66List database :
67
68cd --list
69/home/soutade/proj/v1
70/home/soutade/proj/v2
71/home/soutade/proj/branch/v2
72/home/soutade/proj/*
73>>> /home/soutade/proj/v1
74>>> /home/soutade/proj/v2
75>>> /home/soutade/proj/v3
76
77
78Try to jump to v2 and to v1 :
79
80cd v2
81/home/soutade/proj/v2
82
83cd v[tab][tab]
84v__1__/home/soutade/proj/v1
85v__2__/home/soutade/proj/v2
86v__3__/home/soutade/proj/v3
87v__4__/home/soutade/proj/branch/v2
88
89cd v__1
90/home/soutade/proj/v1
91
92cd br v2
93/home/soutade/proj/branch/v2
94
95
96Remove an item :
97
98cd -r /home/soutade/proj/\\*
99>>> /home/soutade/proj correctly removed from database
100cd --list
101/home/soutade/proj/v1
102/home/soutade/proj/v2
103/home/soutade/proj/branch/v2
104
105
106Modify an item :
107
108cd -m /home/soutade/proj/v2 /home/soutade/proj/v3
109>>> '/home/soutade/proj/v2' is now '/home/soutade/proj/v3'

Archive Download this file

Branches