From becdcd9bb78a552e65f90d3ebb79d286f9496229 Mon Sep 17 00:00:00 2001 From: Craig Barnes Date: Tue, 10 Jan 2023 19:56:12 +0000 Subject: [PATCH] completions: bash: complete option arguments for short options --- completions/bash/foot | 14 +++++++------- completions/bash/footclient | 12 ++++++------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/completions/bash/foot b/completions/bash/foot index c1bb20fa..71aea97c 100644 --- a/completions/bash/foot +++ b/completions/bash/foot @@ -60,21 +60,21 @@ _foot() fi case "$prev" in - --config|--print-pid|--server) + --config|--print-pid|--server|-[cps]) compopt -o default ;; - --working-directory) + --working-directory|-D) compopt -o dirnames ;; - --term) + --term|-t) command -v toe > /dev/null || return 1 COMPREPLY=( $(compgen -W "$(toe -a | awk '$1 ~ /[+]/ {next}; {print $1}')" -- ${cur}) ) ;; - --font) + --font|-f) command -v fc-list > /dev/null || return 1 COMPREPLY=( $(compgen -W "$(fc-list : family | sed 's/,/\n/g' | uniq | tr -d ' ')" -- ${cur}) ) ;; - --log-level) + --log-level|-d) COMPREPLY=( $(compgen -W "none error warning info" -- ${cur}) ) ;; - --log-colorize) + --log-colorize|-l) COMPREPLY=( $(compgen -W "never always auto" -- ${cur}) ) ;; - --app-id|--help|--override|--title|--version|--window-size-chars|--window-size-pixels|--check-config) + --app-id|--help|--override|--title|--version|--window-size-chars|--window-size-pixels|--check-config|-[ahoTvWwC]) # Don't autocomplete for these flags : ;; *) diff --git a/completions/bash/footclient b/completions/bash/footclient index 39cb070e..62abdd65 100644 --- a/completions/bash/footclient +++ b/completions/bash/footclient @@ -56,18 +56,18 @@ _footclient() fi case "$prev" in - --server-socket) + --server-socket|-s) compopt -o default ;; - --working-directory) + --working-directory|-D) compopt -o dirnames ;; - --term) + --term|-t) command -v toe > /dev/null || return 1 COMPREPLY=( $(compgen -W "$(toe -a | awk '$1 ~ /[+]/ {next}; {print $1}')" -- ${cur}) ) ;; - --log-level) + --log-level|-d) COMPREPLY=( $(compgen -W "none error warning info" -- ${cur}) ) ;; - --log-colorize) + --log-colorize|-l) COMPREPLY=( $(compgen -W "never always auto" -- ${cur}) ) ;; - --app-id|--help|--override|--title|--version|--window-size-chars|--window-size-pixels) + --app-id|--help|--override|--title|--version|--window-size-chars|--window-size-pixels|-[ahoTvWw]) # Don't autocomplete for these flags : ;; *)