Skip to content

Commit d9a68f9

Browse files
authored
feat(completions): add completion for jump (#705)
1 parent 501c18a commit d9a68f9

File tree

2 files changed

+30
-6
lines changed

2 files changed

+30
-6
lines changed

completions/jump.completion.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#! bash oh-my-bash.module
2+
3+
if _omb_util_command_exists jump; then
4+
function _omb_plugin_jump_completion {
5+
local JUMP_COMMANDS=$(jump 2>&1 | command grep -E '^ +' | awk '{print $1}')
6+
COMPREPLY=( $(compgen -W '$JUMP_COMMANDS' -- "${COMP_WORDS[1]}") )
7+
}
8+
complete -F _omb_plugin_jump_completion jump
9+
fi

plugins/jump/README.md

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,25 @@
22

33
The jump plugin enables jump on bash.
44

5-
To use it, install
6-
[jump](https://github.com/gsamokovarov/jump?tab=readme-ov-file#installation)
7-
and add jump to the plugins array of your bashrc file:
5+
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.
86

9-
```bash
10-
plugins=(... jump)
11-
```
7+
## Installation
8+
9+
1. [Install jump](https://github.com/gsamokovarov/jump?tab=readme-ov-file#installation)
10+
11+
2. Enable the plugin by adding it to the plugins array of your bashrc file:
12+
13+
```bash
14+
plugins=(... jump)
15+
```
16+
17+
3. (Optional) Enable the completions by adding it to the completions array of bashrc file:
18+
19+
```bash
20+
completions=(... jump)
21+
```
22+
23+
## Usage
24+
25+
See the [jump usage documentation](https://github.com/gsamokovarov/jump?tab=readme-ov-file#usage)
26+
for information on how to use jump.

0 commit comments

Comments
 (0)