From d0c4bf1ba2afd2a52b89fe3785b82da6c6758a84 Mon Sep 17 00:00:00 2001 From: quak Date: Mon, 20 Jan 2025 22:01:22 +0100 Subject: [PATCH] renamed `bash_setup.sh` to `navigate_bash_setup`, fixed completions for `push` --- bash_setup.sh => navigate_bash_setup | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) rename bash_setup.sh => navigate_bash_setup (67%) diff --git a/bash_setup.sh b/navigate_bash_setup similarity index 67% rename from bash_setup.sh rename to navigate_bash_setup index bf50885..ea2fbc9 100644 --- a/bash_setup.sh +++ b/navigate_bash_setup @@ -21,13 +21,6 @@ function book { __call_navigate "bookmark $@" } -# completion for `push` -function _push { - CURRENT_WORD=${COMP_WORDS[COMP_CWORD]} - DIRS="$(find . -maxdepth 1 -type d | grep -vx "." | grep -vx ".." | sed s^"./"^^)" - COMPREPLY=($(compgen -W "${DIRS}" -- $CURRENT_WORD)) -} - # completion for `book` function _book { CURRENT_WORD=${COMP_WORDS[COMP_CWORD]} @@ -35,5 +28,5 @@ function _book { COMPREPLY=($(compgen -W "${BOOKMARKS}" -- $CURRENT_WORD)) } -complete -F _push push +complete -o dirnames push complete -F _book book