From 7e441512ef0042d38d9c14b9d586c3249dadbaf6 Mon Sep 17 00:00:00 2001 From: desktop Date: Sun, 29 Oct 2023 18:22:41 +0300 Subject: [PATCH] bash : git : fix git autocomplete rsync issue. --- document/linux/config/bash/module/git.sh | 37 +++++++++++++----------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/document/linux/config/bash/module/git.sh b/document/linux/config/bash/module/git.sh index 0c3ab25..8f862a5 100644 --- a/document/linux/config/bash/module/git.sh +++ b/document/linux/config/bash/module/git.sh @@ -65,23 +65,26 @@ gu() } # autocomplete. -_completion_loader git -__git_complete gps _git_push -__git_complete gpsf _git_push -__git_complete gpl _git_pull -__git_complete gl _git_log -__git_complete gs _git_status -__git_complete gst _git_stash -__git_complete gd _git_diff -__git_complete gc _git_commit -__git_complete gch _git_checkout -__git_complete gchb _git_checkout -__git_complete gb _git_branch -__git_complete gbd _git_branch -__git_complete gf _git_fetch -__git_complete gt _git_tag -__git_complete gp _git_apply -__git_complete ga _git_add +# if is a fix for rsync. +if [[ $- = *i* ]]; then + _completion_loader git + __git_complete gps _git_push + __git_complete gpsf _git_push + __git_complete gpl _git_pull + __git_complete gl _git_log + __git_complete gs _git_status + __git_complete gst _git_stash + __git_complete gd _git_diff + __git_complete gc _git_commit + __git_complete gch _git_checkout + __git_complete gchb _git_checkout + __git_complete gb _git_branch + __git_complete gbd _git_branch + __git_complete gf _git_fetch + __git_complete gt _git_tag + __git_complete gp _git_apply + __git_complete ga _git_add +fi _gu() {