foot/completions/zsh/_foot
2019-12-17 19:10:07 +01:00

21 lines
886 B
Text

#compdef foot
_arguments \
-s \
'(-c --config)'{-c,--config}'[path to configuration file (XDG_CONFIG_HOME/footrc)]:config:_files' \
'(-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' \
'(-g --geometry)'{-g,--geometry}'[window WIDTHxHEIGHT, in pixels (80x24 cells)]' \
'(-s --server)'{-s,--server}'[run as server; open terminals by running footclient]:server:_files' \
'(-v --version)'{-v,--version}'[show the version number and quit]' \
'(-h --help)'{-h,--help}'[show help message and quit]'
case ${state} in
fonts)
_values 'font families' $(fc-list : family | tr -d ' ')
;;
terms)
_values 'terminal definitions' $(find /usr/share/terminfo -type f -printf "%f\n")
;;
esac