cheatsheet.sh: Fix shellcheck

... and slightly change description

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
This commit is contained in:
Fini Jastrow 2024-08-28 09:08:27 +02:00 committed by Fini
parent 2025f40362
commit 4b4955ff53

View file

@ -2,14 +2,15 @@
# Nerd Fonts Version: 3.2.1 # Nerd Fonts Version: 3.2.1
# Script Version: 1.0.0 # Script Version: 1.0.0
# #
# Search for a glyph by its name in all patched fonts # Search for a glyph by part of its name in all patchsets
# Usage: ./cheatsheet.sh divider # Usage: ./cheatsheet.sh divider
# shellcheck disable=SC1091 # Do not pull in the sourced file
source ./lib/i_all.sh source ./lib/i_all.sh
# Search the key on the declared variables # Search the key on the declared variables
for glyph in ${!i_*}; do for glyph in ${!i_*}; do
if [[ $glyph == *"$1"* ]]; then if [[ "$glyph" == *"$1"* ]]; then
printf "%s\t%x\t%s\n" "${!glyph}" "'${!glyph}'" "$glyph" printf "%s\t%x\t%s\n" "${!glyph}" "'${!glyph}'" "$glyph"
fi fi
done done