diff --git a/completions/jump.completion.sh b/completions/jump.completion.sh new file mode 100644 index 000000000..15a7ca0a5 --- /dev/null +++ b/completions/jump.completion.sh @@ -0,0 +1,9 @@ +#! bash oh-my-bash.module + +if _omb_util_command_exists jump; then + function _omb_plugin_jump_completion { + local JUMP_COMMANDS=$(jump 2>&1 | command grep -E '^ +' | awk '{print $1}') + COMPREPLY=( $(compgen -W '$JUMP_COMMANDS' -- "${COMP_WORDS[1]}") ) + } + complete -F _omb_plugin_jump_completion jump +fi diff --git a/plugins/jump/README.md b/plugins/jump/README.md index e2b16fb45..434078139 100644 --- a/plugins/jump/README.md +++ b/plugins/jump/README.md @@ -2,10 +2,25 @@ The jump plugin enables jump on bash. -To use it, install -[jump](https://github.com/gsamokovarov/jump?tab=readme-ov-file#installation) -and add jump to the plugins array of your bashrc file: +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. -```bash -plugins=(... jump) -``` +## Installation + +1. [Install jump](https://github.com/gsamokovarov/jump?tab=readme-ov-file#installation) + +2. Enable the plugin by adding it to the plugins array of your bashrc file: + + ```bash + plugins=(... jump) + ``` + +3. (Optional) Enable the completions by adding it to the completions array of bashrc file: + + ```bash + completions=(... jump) + ``` + +## Usage + +See the [jump usage documentation](https://github.com/gsamokovarov/jump?tab=readme-ov-file#usage) +for information on how to use jump.