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
This commit is contained in:
Ryan Farley 2021-06-11 04:40:08 -05:00
parent 7ada4c0ab4
commit f379ffb8ed
8 changed files with 184 additions and 89 deletions

View file

@ -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