From 075276d8959efd0f2afa0a01425fd32828d38cf0 Mon Sep 17 00:00:00 2001 From: Martin Atukunda Date: Fri, 8 Aug 2025 02:05:13 +0300 Subject: [PATCH 01/10] add completion --- completions/jump.completion.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 completions/jump.completion.sh diff --git a/completions/jump.completion.sh b/completions/jump.completion.sh new file mode 100644 index 000000000..3a32184df --- /dev/null +++ b/completions/jump.completion.sh @@ -0,0 +1,10 @@ +#! bash oh-my-bash.module + +if _omb_util_command_exists jump; then + _jump() + { + local JUMP_COMMANDS=$(jump 2>&1 | command grep -E '^ +' | awk '{print $1}') + COMPREPLY=( $(compgen -W "$JUMP_COMMANDS" -- "${COMP_WORDS[1]}") ) + } + complete -F _jump jump +fi From c59a8f5fe8185005d4c63e3adedca12a4a60488a Mon Sep 17 00:00:00 2001 From: Martin Atukunda Date: Fri, 8 Aug 2025 02:05:26 +0300 Subject: [PATCH 02/10] update documentation for jump plugin --- plugins/jump/README.md | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/plugins/jump/README.md b/plugins/jump/README.md index e2b16fb45..3b25064b7 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. 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 From f84fff4536f83131017108b94b63210cf3cb9a3d Mon Sep 17 00:00:00 2001 From: Martin Atukunda Date: Sun, 10 Aug 2025 01:06:17 +0300 Subject: [PATCH 03/10] Update completions/jump.completion.sh Co-authored-by: Koichi Murase --- completions/jump.completion.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/completions/jump.completion.sh b/completions/jump.completion.sh index 3a32184df..691311a41 100644 --- a/completions/jump.completion.sh +++ b/completions/jump.completion.sh @@ -4,7 +4,7 @@ if _omb_util_command_exists jump; then _jump() { local JUMP_COMMANDS=$(jump 2>&1 | command grep -E '^ +' | awk '{print $1}') - COMPREPLY=( $(compgen -W "$JUMP_COMMANDS" -- "${COMP_WORDS[1]}") ) + COMPREPLY=( $(compgen -W '$JUMP_COMMANDS' -- "${COMP_WORDS[1]}") ) } complete -F _jump jump fi From 1ceffaa229549f38594076ded4aef5596c361337 Mon Sep 17 00:00:00 2001 From: Martin Atukunda Date: Sun, 10 Aug 2025 01:09:12 +0300 Subject: [PATCH 04/10] Update plugins/jump/README.md Co-authored-by: Koichi Murase --- plugins/jump/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/jump/README.md b/plugins/jump/README.md index 3b25064b7..2d15615ff 100644 --- a/plugins/jump/README.md +++ b/plugins/jump/README.md @@ -23,4 +23,4 @@ Jump integrates with your shell and learns about your navigational habits by kee ## Usage See the [jump usage documentation](https://github.com/gsamokovarov/jump?tab=readme-ov-file#usage) -for information on how to use jump +for information on how to use jump. From faf6ac2bbce3ad16e1c3b1c6febf1af3afb65e15 Mon Sep 17 00:00:00 2001 From: Martin Atukunda Date: Sun, 10 Aug 2025 01:11:11 +0300 Subject: [PATCH 05/10] Jump completion is not mandatory This commit updates the plugin's README to indicate that enabling the completion is an optional part of using the jump plugin. --- plugins/jump/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/jump/README.md b/plugins/jump/README.md index 2d15615ff..434078139 100644 --- a/plugins/jump/README.md +++ b/plugins/jump/README.md @@ -14,7 +14,7 @@ Jump integrates with your shell and learns about your navigational habits by kee plugins=(... jump) ``` -3. Enable the completions by adding it to the completions array of bashrc file: +3. (Optional) Enable the completions by adding it to the completions array of bashrc file: ```bash completions=(... jump) From 657d7f73936799ccbeaacf01954b23d26fe0ab8f Mon Sep 17 00:00:00 2001 From: Martin Atukunda Date: Sun, 10 Aug 2025 01:14:54 +0300 Subject: [PATCH 06/10] Follow the naming convention. In this particular case, follow the one concerning functions defined by a specific plugin. --- completions/jump.completion.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/completions/jump.completion.sh b/completions/jump.completion.sh index 691311a41..677c5b1fb 100644 --- a/completions/jump.completion.sh +++ b/completions/jump.completion.sh @@ -1,10 +1,10 @@ #! bash oh-my-bash.module if _omb_util_command_exists jump; then - _jump() + _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 _jump jump + complete -F _omb_plugin_jump_completion jump fi From eb829dde3a54e5bcc906600327a241fcf8f72b5c Mon Sep 17 00:00:00 2001 From: Koichi Murase Date: Mon, 11 Aug 2025 00:50:21 +0900 Subject: [PATCH 07/10] Update completions/jump.completion.sh --- completions/jump.completion.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/completions/jump.completion.sh b/completions/jump.completion.sh index 677c5b1fb..8da86378f 100644 --- a/completions/jump.completion.sh +++ b/completions/jump.completion.sh @@ -1,7 +1,7 @@ #! bash oh-my-bash.module if _omb_util_command_exists jump; then - _omb_plugin_jump_completion() + 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]}") ) From 72c91ba5987dc76684365acbc95e789d02531546 Mon Sep 17 00:00:00 2001 From: Martin Atukunda Date: Mon, 11 Aug 2025 05:46:07 +0300 Subject: [PATCH 08/10] fix: indentation to use two spaces --- completions/jump.completion.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/completions/jump.completion.sh b/completions/jump.completion.sh index 8da86378f..f79e58663 100644 --- a/completions/jump.completion.sh +++ b/completions/jump.completion.sh @@ -1,10 +1,10 @@ #! 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 + 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 From 0eb38c529e52652fc95991fbd9d0f40057f8f01b Mon Sep 17 00:00:00 2001 From: Koichi Murase Date: Tue, 12 Aug 2025 17:19:11 +0900 Subject: [PATCH 09/10] Update completions/jump.completion.sh --- completions/jump.completion.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/completions/jump.completion.sh b/completions/jump.completion.sh index f79e58663..15a7ca0a5 100644 --- a/completions/jump.completion.sh +++ b/completions/jump.completion.sh @@ -1,8 +1,7 @@ #! bash oh-my-bash.module if _omb_util_command_exists jump; then - function _omb_plugin_jump_completion - { + 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]}") ) } From 4cf12bec4b71ee664b341db2b1653b630291c59d Mon Sep 17 00:00:00 2001 From: Martin Atukunda Date: Thu, 21 Aug 2025 06:16:21 +0300 Subject: [PATCH 10/10] style(plugins/jump): format README for the 50/72 rule. --- plugins/jump/README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/jump/README.md b/plugins/jump/README.md index 434078139..d2ba3f45b 100644 --- a/plugins/jump/README.md +++ b/plugins/jump/README.md @@ -2,7 +2,9 @@ The jump plugin enables jump on bash. -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. +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 @@ -14,7 +16,8 @@ Jump integrates with your shell and learns about your navigational habits by kee plugins=(... jump) ``` -3. (Optional) Enable the completions by adding it to the completions array of bashrc file: +3. (Optional) Enable the completions by adding it to the completions array of + bashrc file: ```bash completions=(... jump)