From fd0f5d327e9f5367fd3bba66bac24e4bb0cc9762 Mon Sep 17 00:00:00 2001 From: cb Date: Thu, 25 Jan 2024 11:19:04 +0100 Subject: [PATCH 1/2] * -h|help --- fnt | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/fnt b/fnt index cbc17f6..8964631 100755 --- a/fnt +++ b/fnt @@ -84,24 +84,23 @@ for a in $check; do fi done -if [ -z "$1" ]; then - cat<< 'EOHELP' -Syntax: fnt [ update | list | info ] +case "$1" in + help|-h) + cat << 'EOF' +Syntax: fnt [ update | list | info | help ] fnt [ install | remove | preview | search ] font update|-u updates the font package index of debian sid list|-l lists installed fonts with glyphcount per font info information about how many fonts can be installed +help|-h this help install|-i install a font remove|-r remove a font preview|-p preview a font search|-s search for font +EOF + ;; -EOHELP - exit 0 -fi - -case "$1" in update|-u) echo Updating... mkdir -p "${CACHEDIR}" @@ -244,11 +243,20 @@ case "$1" in \ \( | ()~() | )/ / \__|\ | (-___-) | /|__/ ' '--' ==`-'== '--' ' - EOF ;; *) - # zcat /usr/share/doc/fnt/README.md.gz |head -10 |grep -v '`' |/usr/games/lolcat - echo "Nothing..." + lolcat=$(command -v cat) + if command -v lolcat>/dev/null; then lolcat=$(command -v lolcat); fi + $lolcat << 'EOF' + .d888 + d88P" 888 + 888 888 +.d88888 888888b. d888888 + 888 888 "88b 888 + 888 888 888 888 + 888 888 888 Y88b. + 888 888 888 "Y888 +EOF ;; esac From f17e528eba4346224ce97bcc4478150af1150c55 Mon Sep 17 00:00:00 2001 From: cb Date: Thu, 25 Jan 2024 12:25:21 +0100 Subject: [PATCH 2/2] update zsh-completion --- completions/_fnt | 1 + 1 file changed, 1 insertion(+) diff --git a/completions/_fnt b/completions/_fnt index 43dae05..a963830 100755 --- a/completions/_fnt +++ b/completions/_fnt @@ -11,6 +11,7 @@ mode) {update,-u}"[updates the font package index of debian sid]" \ {list,-l}"[lists installed fonts with glyphcount per font]" \ info"[information about how many fonts can be installed]" \ + {help,-h}"[show help]" \ {install,-i}"[install a font]" \ {remove,-r}"[remove a font]" \ {preview,-p}"[preview a font]" \