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]" \ diff --git a/fnt b/fnt index c03f2e6..bf55782 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