aboutsummaryrefslogtreecommitdiff
path: root/completions
diff options
context:
space:
mode:
authorRyan Farley <ryan.farley@gmx.com>2021-06-11 09:40:08 +0000
committerRyan Farley <ryan.farley@gmx.com>2021-06-12 08:05:15 +0000
commitf379ffb8ed9bba0dafc2a7c1430ccb1a2517f99c (patch)
tree6d58546ee4af49d67b94e0013c6436e85ef81a70 /completions
parentMerge branch 'no-conf-found-is-not-an-error' (diff)
Override options from command line
Allow any configuration option to be overridden with -o/--override 'section.key=value' arguments, as suggested in #554 update completitions for override slight refactoring to ease footclient support
Diffstat (limited to 'completions')
-rw-r--r--completions/bash/foot3
-rw-r--r--completions/fish/foot.fish1
-rw-r--r--completions/zsh/_foot1
3 files changed, 4 insertions, 1 deletions
diff --git a/completions/bash/foot b/completions/bash/foot
index 6fbe635f..f03a9f53 100644
--- a/completions/bash/foot
+++ b/completions/bash/foot
@@ -17,6 +17,7 @@ _foot()
"--log-no-syslog"
"--login-shell"
"--maximized"
+ "--override"
"--print-pid"
"--server"
"--term"
@@ -70,7 +71,7 @@ _foot()
COMPREPLY=( $(compgen -W "error warning info" -- ${cur}) )
elif [[ ${prev} == '--log-colorize' ]] ; then
COMPREPLY=( $(compgen -W "never always auto" -- ${cur}) )
- elif [[ ${prev} =~ ^(--app-id|--help|--title|--version|--window-size-chars|--window-size-pixels|--check-config)$ ]] ; then
+ elif [[ ${prev} =~ ^(--app-id|--help|--override|--title|--version|--window-size-chars|--window-size-pixels|--check-config)$ ]] ; then
: # don't autocomplete for these flags
else
# complete commands from $PATH
diff --git a/completions/fish/foot.fish b/completions/fish/foot.fish
index 58ae8f11..dbec61e7 100644
--- a/completions/fish/foot.fish
+++ b/completions/fish/foot.fish
@@ -1,6 +1,7 @@
complete -c foot -x -a "(__fish_complete_subcommand)"
complete -c foot -r -s c -l config -d "path to configuration file (XDG_CONFIG_HOME/foot/foot.ini)"
complete -c foot -s C -l check-config -d "verify configuration and exit with 0 if ok, otherwise exit with 1"
+complete -c foot -x -s o -l override -d "configuration option to override, in form SECTION.KEY=VALUE"
complete -c foot -x -s f -l font -a "(fc-list : family | sed 's/,/\n/g' | sort | uniq)" -d "font name and style in fontconfig format (monospace)"
complete -c foot -x -s t -l term -a '(find /usr/share/terminfo -type f -printf "%f\n")' -d "value to set the environment variable TERM to (foot)"
complete -c foot -x -s T -l title -d "initial window title"
diff --git a/completions/zsh/_foot b/completions/zsh/_foot
index d87ad919..b3f9b42c 100644
--- a/completions/zsh/_foot
+++ b/completions/zsh/_foot
@@ -4,6 +4,7 @@ _arguments \
-s -S -C \
'(-c --config)'{-c,--config}'[path to configuration file (XDG_CONFIG_HOME/foot/foot.ini)]:config:_files' \
'(-C --check-config)'{-C,--check-config}'[verify configuration and exit with 0 if ok, otherwise exit with 1]' \
+ '(-o --override)'{-o,--override}'[configuration option to override, in form SECTION.KEY=VALUE]:()' \
'(-f --font)'{-f,--font}'[font name and style in fontconfig format (monospace)]:font:->fonts' \
'(-t --term)'{-t,--term}'[value to set the environment variable TERM to (foot)]:term:->terms' \
'(-T --title)'{-T,--title}'[initial window title]:()' \