completions: add -o,--override to footclient

This commit is contained in:
Daniel Eklöf 2021-06-23 14:34:50 +02:00
parent 8640a9c99a
commit 5b9a000b9b
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
3 changed files with 4 additions and 1 deletions

View file

@ -13,6 +13,7 @@ _footclient()
"--log-level"
"--log-colorize"
"--maximized"
"--override"
"--server-socket"
"--term"
"--title"
@ -61,7 +62,7 @@ _footclient()
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|)$ ]] ; then
elif [[ ${prev} =~ ^(--app-id|--help|--override|--title|--version|--window-size-chars|--window-size-pixels|)$ ]] ; then
: # don't autocomplete for these flags
else
# complete commands from $PATH

View file

@ -11,6 +11,7 @@ complete -c footclient -x -s W -l window-size-chars
complete -c footclient -F -s s -l server-socket -d "override the default path to the foot server socket ($XDG_RUNTIME_DIR/foot-$WAYLAND_DISPLAY.sock)"
complete -c footclient -s H -l hold -d "remain open after child process exits"
complete -c footclient -s N -l no-wait -d "detach the client process from the running terminal, exiting immediately"
complete -c footclient -x -s o -l override -d "configuration option to override, in form SECTION.KEY=VALUE"
complete -c footclient -x -s d -l log-level -a "info warning error" -d "log-level (info)"
complete -c footclient -x -s l -l log-colorize -a "always never auto" -d "enable or disable colorization of log output on stderr"
complete -c footclient -s v -l version -d "show the version number and quit"

View file

@ -14,6 +14,7 @@ _arguments \
'(-s --server-socket)'{-s,--server-socket}'[override the default path to the foot server socket ($XDG_RUNTIME_DIR/foot-$WAYLAND_DISPLAY.sock)]:server:_files' \
'(-H --hold)'{-H,--hold}'[remain open after child process exits]' \
'(-N --no-wait)'{-N,--no-wait}'[detach the client process from the running terminal, exiting immediately]' \
'(-o --override)'{-o,--override}'[configuration option to override, in form SECTION.KEY=VALUE]:()' \
'(-d --log-level)'{-d,--log-level}'[log level (info)]:loglevel:(info warning error)' \
'(-l --log-colorize)'{-l,--log-colorize}'[enable or disable colorization of log output on stderr]:logcolor:(never always auto)' \
'(-v --version)'{-v,--version}'[show the version number and quit]' \