Skip to content

Commit

Permalink
Merge pull request #35 from crpb/help
Browse files Browse the repository at this point in the history
 * -h|help
  • Loading branch information
alexmyczko authored Mar 26, 2024
2 parents 77c352e + f17e528 commit 06172af
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
1 change: 1 addition & 0 deletions completions/_fnt
Original file line number Diff line number Diff line change
Expand Up @@ -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]" \
Expand Down
30 changes: 19 additions & 11 deletions fnt
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down Expand Up @@ -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

0 comments on commit 06172af

Please sign in to comment.