Skip to content

Commit

Permalink
completion/zsh: add.
Browse files Browse the repository at this point in the history
  • Loading branch information
crpb authored and jwilk committed Apr 3, 2024
1 parent f27d653 commit f9d3694
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions completion/zsh/_ubanner
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#compdef ubanner

# Copyright © 2024 Christopher Bock <[email protected]>
# SPDX-License-Identifier: MIT

local arguments

arguments=(
'--trim[trim leading/trailing empty lines]'
'(-f --font)'{-f,--font}'[use this font face]:font:->fonts'
+ '(fs)'
'(-s --font-size)'{-s,--font-size}'[font size in pixels]: :_numbers -d28 -l14 -m280'
'(-S --full-screen)'{-S,--full-screen}'[max font size to fit terminal window]'
+ '(excl)'
{-h,--help}'[show help]'
'--version[show version information and exit]'
'--list-fonts[print list of available font faces]'
)
_arguments -S $arguments
case "$state" in
fonts)
local -a fontfaces
fontfaces=("${(@f)$(ubanner --list-fonts)}")
_values "fontname" $fontfaces
;;
esac

0 comments on commit f9d3694

Please sign in to comment.