From: Shane Jaroch Date: Thu, 8 Jan 2026 23:09:18 +0000 (-0500) Subject: fixup completions for check & clean X-Git-Url: https://git.nutra.tk/v1?a=commitdiff_plain;h=12af58463e932296c4c7ce7457a3c0945302356e;p=gamesguru%2Fgit-remote-gcrypt.git fixup completions for check & clean --- diff --git a/completions/bash/git-remote-gcrypt b/completions/bash/git-remote-gcrypt index d8b5eb5..71027d2 100644 --- a/completions/bash/git-remote-gcrypt +++ b/completions/bash/git-remote-gcrypt @@ -22,11 +22,12 @@ _git_remote_gcrypt() { case "${COMP_WORDS[1]}" in clean) local remotes=$(git remote -v 2>/dev/null | grep 'gcrypt::' | awk '{print $1}' | sort -u || :) - COMPREPLY=($(compgen -W "-f --force -h --help $remotes" -- "$cur")) + COMPREPLY=($(compgen -W "-f --force $remotes" -- "$cur")) return 0 ;; - check|--check) - COMPREPLY=($(compgen -f -- "$cur")) + check) + local remotes=$(git remote -v 2>/dev/null | grep 'gcrypt::' | awk '{print $1}' | sort -u || :) + COMPREPLY=($(compgen -W "$remotes" -- "$cur")) return 0 ;; capabilities|fetch|list|push) diff --git a/completions/templates/bash.in b/completions/templates/bash.in index b5d8157..1f551c7 100644 --- a/completions/templates/bash.in +++ b/completions/templates/bash.in @@ -22,11 +22,12 @@ _git_remote_gcrypt() { case "${COMP_WORDS[1]}" in clean) local remotes=$(git remote -v 2>/dev/null | grep 'gcrypt::' | awk '{print $1}' | sort -u || :) - COMPREPLY=($(compgen -W "-f --force -h --help $remotes" -- "$cur")) + COMPREPLY=($(compgen -W "-f --force $remotes" -- "$cur")) return 0 ;; - check|--check) - COMPREPLY=($(compgen -f -- "$cur")) + check) + local remotes=$(git remote -v 2>/dev/null | grep 'gcrypt::' | awk '{print $1}' | sort -u || :) + COMPREPLY=($(compgen -W "$remotes" -- "$cur")) return 0 ;; capabilities|fetch|list|push) diff --git a/completions/templates/zsh.in b/completions/templates/zsh.in index 96f3ad2..11f51cf 100644 --- a/completions/templates/zsh.in +++ b/completions/templates/zsh.in @@ -20,7 +20,7 @@ _git_remote_gcrypt() { ;; check) _arguments \ - '1:gcrypt URL:_files' + '*:gcrypt URL: _alternative "remotes:gcrypt remote:($(git remote -v 2>/dev/null | grep "gcrypt::" | awk "{print \$1}" | sort -u))" "files:file:_files"' ;; *) _arguments \ diff --git a/completions/zsh/_git-remote-gcrypt b/completions/zsh/_git-remote-gcrypt index 3103307..9d2029d 100644 --- a/completions/zsh/_git-remote-gcrypt +++ b/completions/zsh/_git-remote-gcrypt @@ -20,7 +20,7 @@ _git_remote_gcrypt() { ;; check) _arguments \ - '1:gcrypt URL:_files' + '*:gcrypt URL: _alternative "remotes:gcrypt remote:($(git remote -v 2>/dev/null | grep "gcrypt::" | awk "{print \$1}" | sort -u))" "files:file:_files"' ;; *) _arguments \