cdhist 4.2__tar.gz → 4.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cdhist-4.2/cdhist.egg-info → cdhist-4.3}/PKG-INFO +24 -7
- {cdhist-4.2 → cdhist-4.3}/README.md +23 -6
- {cdhist-4.2 → cdhist-4.3}/cdhist/utils.py +2 -1
- {cdhist-4.2 → cdhist-4.3/cdhist.egg-info}/PKG-INFO +24 -7
- {cdhist-4.2 → cdhist-4.3}/.gitignore +0 -0
- {cdhist-4.2 → cdhist-4.3}/Makefile +0 -0
- {cdhist-4.2 → cdhist-4.3}/cdhist/__init__.py +0 -0
- {cdhist-4.2 → cdhist-4.3}/cdhist/__main__.py +0 -0
- {cdhist-4.2 → cdhist-4.3}/cdhist/cdhist.py +0 -0
- {cdhist-4.2 → cdhist-4.3}/cdhist/git_worktree.py +0 -0
- {cdhist-4.2 → cdhist-4.3}/cdhist.egg-info/SOURCES.txt +0 -0
- {cdhist-4.2 → cdhist-4.3}/cdhist.egg-info/dependency_links.txt +0 -0
- {cdhist-4.2 → cdhist-4.3}/cdhist.egg-info/entry_points.txt +0 -0
- {cdhist-4.2 → cdhist-4.3}/cdhist.egg-info/top_level.txt +0 -0
- {cdhist-4.2 → cdhist-4.3}/pyproject.toml +0 -0
- {cdhist-4.2 → cdhist-4.3}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: cdhist
|
|
3
|
-
Version: 4.
|
|
3
|
+
Version: 4.3
|
|
4
4
|
Summary: Program to provide a Linux cd history directory stack
|
|
5
5
|
Author-email: Mark Blakeney <mark.blakeney@bullet-systems.net>
|
|
6
6
|
License: GPLv3
|
|
@@ -85,14 +85,16 @@ Change immediately to directory corresponding to stack index 4:
|
|
|
85
85
|
$ cd -4
|
|
86
86
|
```
|
|
87
87
|
|
|
88
|
-
Search back through stack for directory containing "string" and
|
|
89
|
-
there:
|
|
88
|
+
Search back through stack for directory containing "string" in it's name and
|
|
89
|
+
`cd` there:
|
|
90
90
|
|
|
91
91
|
```sh
|
|
92
92
|
$ cd -/string
|
|
93
93
|
```
|
|
94
94
|
|
|
95
|
-
Note, you can also type `string` at the `cd --` prompt to search
|
|
95
|
+
Note, you can also type the text `string` at the `cd --` prompt to search, although for
|
|
96
|
+
frequent searching it is probably better to use an [integrated fuzzy
|
|
97
|
+
finder](#fuzzy-finder-integration).
|
|
96
98
|
|
|
97
99
|
Show help/usage:
|
|
98
100
|
|
|
@@ -192,16 +194,23 @@ E.g. to use [`fzf`][fzf]:
|
|
|
192
194
|
source <(cdhist -i "cd -F fzf")
|
|
193
195
|
```
|
|
194
196
|
|
|
195
|
-
Or, to use [`television`][television]
|
|
197
|
+
Or, to use [`television`][television] with [`exa`][exa] to show a preview of
|
|
198
|
+
directory contents:
|
|
196
199
|
|
|
197
200
|
```sh
|
|
198
|
-
source <(cdhist -i "cd -
|
|
201
|
+
source <(cdhist -i "cd -uF \"tv --preview 'exa --color=always -l {}'\"")
|
|
199
202
|
```
|
|
200
203
|
|
|
201
204
|
Now when you type `cd --` you will be prompted with a list of directories via
|
|
202
205
|
your fuzzy finder so you can search for a directory to select by fuzzy text
|
|
203
206
|
matching.
|
|
204
207
|
|
|
208
|
+
Note if you use [`television`][television] then it is suggested to set the
|
|
209
|
+
`television` option `input_bar_position = bottom` in the `ui` section of your
|
|
210
|
+
[`~/.config/television/config.toml`](https://github.com/alexpasmantier/television/blob/main/.config/config.toml)
|
|
211
|
+
file so that the input bar is at the bottom of the screen and close where your
|
|
212
|
+
terminal prompt usually is.
|
|
213
|
+
|
|
205
214
|
In the following description, [`fzf`][fzf] will be used as it is by far the
|
|
206
215
|
most popular fuzzy finder and the one used by the author. When you set up `fzf`
|
|
207
216
|
[shell integration](https://junegunn.github.io/fzf/shell-integration/) then you
|
|
@@ -218,7 +227,7 @@ I disable that function in `fzf` by setting the `FZF_ALT_C_COMMAND` to an empty
|
|
|
218
227
|
string before I source `fzf` in my `.bashrc` when [setting `fzf` up](https://junegunn.github.io/fzf/shell-integration/#setting-up-shell-integration).
|
|
219
228
|
|
|
220
229
|
Then I set the following shell key binding in my `~/.inputrc` file (need to
|
|
221
|
-
restart your shell to activate):
|
|
230
|
+
restart your login shell/terminal to activate):
|
|
222
231
|
|
|
223
232
|
```sh
|
|
224
233
|
"\ec": "cd --\n"
|
|
@@ -251,6 +260,11 @@ you don't then just specify the full path, e.g:
|
|
|
251
260
|
source <(cdhist -i "cd -F /path-to/fzf")
|
|
252
261
|
```
|
|
253
262
|
|
|
263
|
+
### Yazi Integration
|
|
264
|
+
|
|
265
|
+
[`cdhist.yazi`][cdhist.yazi] is a [Yazi][yazi] plugin that provides cdhist
|
|
266
|
+
functionality within the [Yazi][yazi] terminal file manager.
|
|
267
|
+
|
|
254
268
|
### GIT Worktree Integration
|
|
255
269
|
|
|
256
270
|
[cdhist](http://github.com/bulletmark/cdhist) can be used to easily `cd`
|
|
@@ -415,3 +429,6 @@ Public License at <http://www.gnu.org/licenses/> for more details.
|
|
|
415
429
|
[fzy]: https://github.com/jhawthorn/fzy
|
|
416
430
|
[skim]: https://github.com/skim-rs/skim
|
|
417
431
|
[television]: https://github.com/alexpasmantier/television
|
|
432
|
+
[cdhist.yazi]: https://github.com/bulletmark/cdhist.yazi
|
|
433
|
+
[yazi]: https://yazi-rs.github.io/
|
|
434
|
+
[exa]: https://github.com/ogham/exa
|
|
@@ -73,14 +73,16 @@ Change immediately to directory corresponding to stack index 4:
|
|
|
73
73
|
$ cd -4
|
|
74
74
|
```
|
|
75
75
|
|
|
76
|
-
Search back through stack for directory containing "string" and
|
|
77
|
-
there:
|
|
76
|
+
Search back through stack for directory containing "string" in it's name and
|
|
77
|
+
`cd` there:
|
|
78
78
|
|
|
79
79
|
```sh
|
|
80
80
|
$ cd -/string
|
|
81
81
|
```
|
|
82
82
|
|
|
83
|
-
Note, you can also type `string` at the `cd --` prompt to search
|
|
83
|
+
Note, you can also type the text `string` at the `cd --` prompt to search, although for
|
|
84
|
+
frequent searching it is probably better to use an [integrated fuzzy
|
|
85
|
+
finder](#fuzzy-finder-integration).
|
|
84
86
|
|
|
85
87
|
Show help/usage:
|
|
86
88
|
|
|
@@ -180,16 +182,23 @@ E.g. to use [`fzf`][fzf]:
|
|
|
180
182
|
source <(cdhist -i "cd -F fzf")
|
|
181
183
|
```
|
|
182
184
|
|
|
183
|
-
Or, to use [`television`][television]
|
|
185
|
+
Or, to use [`television`][television] with [`exa`][exa] to show a preview of
|
|
186
|
+
directory contents:
|
|
184
187
|
|
|
185
188
|
```sh
|
|
186
|
-
source <(cdhist -i "cd -
|
|
189
|
+
source <(cdhist -i "cd -uF \"tv --preview 'exa --color=always -l {}'\"")
|
|
187
190
|
```
|
|
188
191
|
|
|
189
192
|
Now when you type `cd --` you will be prompted with a list of directories via
|
|
190
193
|
your fuzzy finder so you can search for a directory to select by fuzzy text
|
|
191
194
|
matching.
|
|
192
195
|
|
|
196
|
+
Note if you use [`television`][television] then it is suggested to set the
|
|
197
|
+
`television` option `input_bar_position = bottom` in the `ui` section of your
|
|
198
|
+
[`~/.config/television/config.toml`](https://github.com/alexpasmantier/television/blob/main/.config/config.toml)
|
|
199
|
+
file so that the input bar is at the bottom of the screen and close where your
|
|
200
|
+
terminal prompt usually is.
|
|
201
|
+
|
|
193
202
|
In the following description, [`fzf`][fzf] will be used as it is by far the
|
|
194
203
|
most popular fuzzy finder and the one used by the author. When you set up `fzf`
|
|
195
204
|
[shell integration](https://junegunn.github.io/fzf/shell-integration/) then you
|
|
@@ -206,7 +215,7 @@ I disable that function in `fzf` by setting the `FZF_ALT_C_COMMAND` to an empty
|
|
|
206
215
|
string before I source `fzf` in my `.bashrc` when [setting `fzf` up](https://junegunn.github.io/fzf/shell-integration/#setting-up-shell-integration).
|
|
207
216
|
|
|
208
217
|
Then I set the following shell key binding in my `~/.inputrc` file (need to
|
|
209
|
-
restart your shell to activate):
|
|
218
|
+
restart your login shell/terminal to activate):
|
|
210
219
|
|
|
211
220
|
```sh
|
|
212
221
|
"\ec": "cd --\n"
|
|
@@ -239,6 +248,11 @@ you don't then just specify the full path, e.g:
|
|
|
239
248
|
source <(cdhist -i "cd -F /path-to/fzf")
|
|
240
249
|
```
|
|
241
250
|
|
|
251
|
+
### Yazi Integration
|
|
252
|
+
|
|
253
|
+
[`cdhist.yazi`][cdhist.yazi] is a [Yazi][yazi] plugin that provides cdhist
|
|
254
|
+
functionality within the [Yazi][yazi] terminal file manager.
|
|
255
|
+
|
|
242
256
|
### GIT Worktree Integration
|
|
243
257
|
|
|
244
258
|
[cdhist](http://github.com/bulletmark/cdhist) can be used to easily `cd`
|
|
@@ -403,3 +417,6 @@ Public License at <http://www.gnu.org/licenses/> for more details.
|
|
|
403
417
|
[fzy]: https://github.com/jhawthorn/fzy
|
|
404
418
|
[skim]: https://github.com/skim-rs/skim
|
|
405
419
|
[television]: https://github.com/alexpasmantier/television
|
|
420
|
+
[cdhist.yazi]: https://github.com/bulletmark/cdhist.yazi
|
|
421
|
+
[yazi]: https://yazi-rs.github.io/
|
|
422
|
+
[exa]: https://github.com/ogham/exa
|
|
@@ -7,6 +7,7 @@ import subprocess
|
|
|
7
7
|
import sys
|
|
8
8
|
from argparse import Namespace
|
|
9
9
|
from pathlib import Path
|
|
10
|
+
import shlex
|
|
10
11
|
|
|
11
12
|
HOME = Path.home()
|
|
12
13
|
|
|
@@ -23,7 +24,7 @@ def unexpanduser(path: str | Path) -> str:
|
|
|
23
24
|
|
|
24
25
|
def fuzzy_prompt(args: Namespace, dirlist: list[str]) -> str | None:
|
|
25
26
|
res = subprocess.run(
|
|
26
|
-
args.fuzzy
|
|
27
|
+
shlex.split(args.fuzzy), input='\n'.join(dirlist), stdout=subprocess.PIPE, text=True
|
|
27
28
|
)
|
|
28
29
|
|
|
29
30
|
if res.returncode != 0:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: cdhist
|
|
3
|
-
Version: 4.
|
|
3
|
+
Version: 4.3
|
|
4
4
|
Summary: Program to provide a Linux cd history directory stack
|
|
5
5
|
Author-email: Mark Blakeney <mark.blakeney@bullet-systems.net>
|
|
6
6
|
License: GPLv3
|
|
@@ -85,14 +85,16 @@ Change immediately to directory corresponding to stack index 4:
|
|
|
85
85
|
$ cd -4
|
|
86
86
|
```
|
|
87
87
|
|
|
88
|
-
Search back through stack for directory containing "string" and
|
|
89
|
-
there:
|
|
88
|
+
Search back through stack for directory containing "string" in it's name and
|
|
89
|
+
`cd` there:
|
|
90
90
|
|
|
91
91
|
```sh
|
|
92
92
|
$ cd -/string
|
|
93
93
|
```
|
|
94
94
|
|
|
95
|
-
Note, you can also type `string` at the `cd --` prompt to search
|
|
95
|
+
Note, you can also type the text `string` at the `cd --` prompt to search, although for
|
|
96
|
+
frequent searching it is probably better to use an [integrated fuzzy
|
|
97
|
+
finder](#fuzzy-finder-integration).
|
|
96
98
|
|
|
97
99
|
Show help/usage:
|
|
98
100
|
|
|
@@ -192,16 +194,23 @@ E.g. to use [`fzf`][fzf]:
|
|
|
192
194
|
source <(cdhist -i "cd -F fzf")
|
|
193
195
|
```
|
|
194
196
|
|
|
195
|
-
Or, to use [`television`][television]
|
|
197
|
+
Or, to use [`television`][television] with [`exa`][exa] to show a preview of
|
|
198
|
+
directory contents:
|
|
196
199
|
|
|
197
200
|
```sh
|
|
198
|
-
source <(cdhist -i "cd -
|
|
201
|
+
source <(cdhist -i "cd -uF \"tv --preview 'exa --color=always -l {}'\"")
|
|
199
202
|
```
|
|
200
203
|
|
|
201
204
|
Now when you type `cd --` you will be prompted with a list of directories via
|
|
202
205
|
your fuzzy finder so you can search for a directory to select by fuzzy text
|
|
203
206
|
matching.
|
|
204
207
|
|
|
208
|
+
Note if you use [`television`][television] then it is suggested to set the
|
|
209
|
+
`television` option `input_bar_position = bottom` in the `ui` section of your
|
|
210
|
+
[`~/.config/television/config.toml`](https://github.com/alexpasmantier/television/blob/main/.config/config.toml)
|
|
211
|
+
file so that the input bar is at the bottom of the screen and close where your
|
|
212
|
+
terminal prompt usually is.
|
|
213
|
+
|
|
205
214
|
In the following description, [`fzf`][fzf] will be used as it is by far the
|
|
206
215
|
most popular fuzzy finder and the one used by the author. When you set up `fzf`
|
|
207
216
|
[shell integration](https://junegunn.github.io/fzf/shell-integration/) then you
|
|
@@ -218,7 +227,7 @@ I disable that function in `fzf` by setting the `FZF_ALT_C_COMMAND` to an empty
|
|
|
218
227
|
string before I source `fzf` in my `.bashrc` when [setting `fzf` up](https://junegunn.github.io/fzf/shell-integration/#setting-up-shell-integration).
|
|
219
228
|
|
|
220
229
|
Then I set the following shell key binding in my `~/.inputrc` file (need to
|
|
221
|
-
restart your shell to activate):
|
|
230
|
+
restart your login shell/terminal to activate):
|
|
222
231
|
|
|
223
232
|
```sh
|
|
224
233
|
"\ec": "cd --\n"
|
|
@@ -251,6 +260,11 @@ you don't then just specify the full path, e.g:
|
|
|
251
260
|
source <(cdhist -i "cd -F /path-to/fzf")
|
|
252
261
|
```
|
|
253
262
|
|
|
263
|
+
### Yazi Integration
|
|
264
|
+
|
|
265
|
+
[`cdhist.yazi`][cdhist.yazi] is a [Yazi][yazi] plugin that provides cdhist
|
|
266
|
+
functionality within the [Yazi][yazi] terminal file manager.
|
|
267
|
+
|
|
254
268
|
### GIT Worktree Integration
|
|
255
269
|
|
|
256
270
|
[cdhist](http://github.com/bulletmark/cdhist) can be used to easily `cd`
|
|
@@ -415,3 +429,6 @@ Public License at <http://www.gnu.org/licenses/> for more details.
|
|
|
415
429
|
[fzy]: https://github.com/jhawthorn/fzy
|
|
416
430
|
[skim]: https://github.com/skim-rs/skim
|
|
417
431
|
[television]: https://github.com/alexpasmantier/television
|
|
432
|
+
[cdhist.yazi]: https://github.com/bulletmark/cdhist.yazi
|
|
433
|
+
[yazi]: https://yazi-rs.github.io/
|
|
434
|
+
[exa]: https://github.com/ogham/exa
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|