From 680f64dec37c50e9d9753e88497c6a08bbcdef89 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Sun, 5 Jul 2020 00:19:22 +0100 Subject: [PATCH] completion: misc updates --- git-fame_completion.bash | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/git-fame_completion.bash b/git-fame_completion.bash index 203adea..714c714 100644 --- a/git-fame_completion.bash +++ b/git-fame_completion.bash @@ -9,18 +9,27 @@ _git_fame() ;; *) case ${prv} in - "--sort") - COMPREPLY=($(compgen -W 'loc commits files' -- ${cur})) + --sort) + COMPREPLY=($(compgen -W 'loc commits files hours months' -- ${cur})) ;; - "--cost") + --cost) COMPREPLY=($(compgen -W 'months cocomo hours commits' -- ${cur})) ;; - "--format") + --format) COMPREPLY=($(compgen -W 'pipe markdown yaml json csv tsv tabulate' -- ${cur})) ;; - "--log") + --log) COMPREPLY=($(compgen -W 'FATAL CRITICAL ERROR WARNING INFO DEBUG NOTSET' -- ${cur})) ;; + --branch) + COMPREPLY=($(compgen -W "$(git branch | sed 's/*/ /')" -- ${cur})) + ;; + --manpath) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + --incl|--excl|--since) + COMPREPLY=( ) + ;; *) if [ ${COMP_WORDS[1]} == fame ]; then COMPREPLY=($(compgen -dW '-h --help -v --version --cost --branch --since --sort --incl --excl -n --no-regex -s --silent-progress --warn-binary -t --bytype -w --ignore-whitespace -e --show-email -M -C --format --manpath --log' -- ${cur}))