From 4dec6b288fea34fd7517914d9e366556394f42ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aljaz=CC=8C=20=22g5pw=22=20Srebrnic=CC=8C?= Date: Tue, 30 Oct 2012 11:19:24 +0100 Subject: [PATCH] Eliminated zsh references in completion Since there is another, totally different completion function, this patch eliminates all references to zsh in _git_index_tab_completion. --- lib/git/repo_index.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/git/repo_index.sh b/lib/git/repo_index.sh index 8ec1c95..d4d10ab 100644 --- a/lib/git/repo_index.sh +++ b/lib/git/repo_index.sh @@ -301,13 +301,11 @@ if [ $shell = 'bash' ]; then COMPREPLY=($(compgen -d "$base_path$search_path" | \grep -v "/.git" | sed -e "s:$base_path:$project:" -e "s:$:/:" )) # If curr string starts with /, tab complete top-level directories in root project dir - elif ([ $shell = "bash" ] && [ "${curw:0:1}" = "/" ]) || \ - ([ $shell = "zsh" ] && [ "${curw[1,1]}" = "/" ]); then + elif [ "${curw:0:1}" = "/" ]; then COMPREPLY=($(compgen -d "$GIT_REPO_DIR$curw" | sed -e "s:$GIT_REPO_DIR/::" -e "s:^:/:")) # If curr string starts with --, tab complete commands - elif ([ $shell = "bash" ] && [ "${curw:0:2}" = "--" ]) || \ - ([ $shell = "zsh" ] && [ "${curw[1,2]}" = "--" ]); then + elif [ "${curw:0:2}" = "--" ]; then local commands="--list\n--rebuild\n--update-all\n--batch-cmd\n--count-by-host" COMPREPLY=($(compgen -W '$(echo -e "\n"$commands)' -- $curw))