-
Notifications
You must be signed in to change notification settings - Fork 59
/
snapcraft.yaml
132 lines (84 loc) · 3.99 KB
/
snapcraft.yaml
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
name: jump
version: '0.51.0'
summary: Jump helps you navigate faster by learning your habits.
description: |
**Jump** integrates with your shell and learns about your navigational habits by
keeping track of the directories you visit. It gives you the most visited
directory for the shortest search term you type.
## Installation
`sudo snap install jump`
### Integration
Jump needs to be integrated with the shell. For `bash` and `zsh`, the line
below needs to be in `~/.bashrc`, `~/bash_profile` or `~/.zshrc`:
`eval "$(jump shell)"`
For fish shell, the line below needs to be in `~/.config/fish/config.fish`:
`jump shell fish | source`
For PowerShell, the line below needs to be in your profile, located by typing $PROFILE:
`Invoke-Expression (&jump shell pwsh | Out-String)`
## Usage
Once integrated, **jump** introduces the **j** helper. It accepts only search
terms and as a design goal there are no arguments to **j**. Whatever you give
it, it's treated as search term.
**Jump** uses fuzzy matching to find the desired directory to jump to. This
means that your search terms are patterns that match the desired directory
approximately rather than exactly. Typing **2** to **5** consecutive characters
of the directory name is all that **jump** needs to find it.
### Regular jump
The default search behavior of **jump** is to fuzzy match the
directory name of a score. The match is case insensitive.
If you visit the directory `/Users/genadi/rails/web-console` often,
you can jump to it by:
`j wc` or `j webc` or `j console` or `j b-c`
Using jump is all about saving key strokes. However, if you made the effort to
type a directory base name exactly, **jump** will try to find the exact match,
rather than fuzzy search.
`$ j web-console # -> /Users/genadi/rails/web-console`
### Deep jump
Given the following directories:
`/Users/genadi/society/website`
`/Users/genadi/chaos/website`
Typing `j site` matches only the base names of the directories. The base name
of `/Users/genadi/society/website` is `website`, the same as the
other absolute path above. The jump above will land on the most scrored path,
which is the `society` one, however what if we wanted to land on the `chaos`
website?
`$ j ch site # -> /Users/genadi/chaos/website`
This instructs **jump** to look for a `site` match inside that is preceded by a
`ch` match in the parent directory. The search is normalized only on the last
two parts of the target paths. This will ensure a better match, because of the
shorter path to fuzzy match on.
There are no depth limitations though and a jump to
`/Users/genadi/society/website` can look like:
`$ j dev soc web # -> /Users/genadi/society/website`
In fact, every space passed to `j` is converted to an OS separator. The last
search term can be expressed as:
`$ j dev/soc/web # -> /Users/genadi/society/website`
## Reverse jump
Bad jumps happen. Sometimes we're looking for a directory that doesn't have the
best score at the moment. Let's work with the following following jump database:
`/Users/genadi/society/website`
`/Users/genadi/chaos/website`
`/Users/genadi/hack/website`
Typing `j web` would lead to:
`$ j web # -> /Users/genadi/society/website`
If we didn't expect this result, instead of another search term, typing **j**
without any arguments will instruct **jump** to go the second best match.
`$ j # -> /Users/genadi/chaos/website`
### Case sensitive jump
To trigger a case-sensitive search, use a term that has a capital letter.
`$ j Dev # -> /Users/genadi/Development`
The jump will resolve to `/Users/genadi/Development` even if there is
`/Users/genadi/dev-tools` that scores better.
## Is it like autojump or z?
Yes, it is! You can import your datafile from `autojump` or `z` with:
`$ jump import`
confinement: strict
base: core20
parts:
jump:
plugin: go
source: https://github.com/gsamokovarov/jump
source-type: git
apps:
jump:
command: bin/jump