2024-08-27 22:17:29 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
# Nerd Fonts Version: 3.2.1
|
|
|
|
# Script Version: 1.0.0
|
|
|
|
#
|
2024-08-28 09:08:27 +02:00
|
|
|
# Search for a glyph by part of its name in all patchsets
|
2024-08-27 22:17:29 +02:00
|
|
|
# Usage: ./cheatsheet.sh divider
|
|
|
|
|
2024-08-28 09:30:07 +02:00
|
|
|
# Get script directory to set source and target dirs relative to it
|
|
|
|
sd="$( cd -- "$(dirname "${0}")" >/dev/null 2>&1 || exit ; pwd -P )"
|
|
|
|
|
2024-08-28 09:08:27 +02:00
|
|
|
# shellcheck disable=SC1091 # Do not pull in the sourced file
|
2024-08-28 09:30:07 +02:00
|
|
|
source "${sd}/lib/i_all.sh"
|
2024-08-27 22:17:29 +02:00
|
|
|
|
|
|
|
# Search the key on the declared variables
|
|
|
|
for glyph in ${!i_*}; do
|
2024-08-28 09:31:31 +02:00
|
|
|
if [[ "${glyph}" == *"${1}"* ]]; then
|
|
|
|
printf "%s\t%x\t%s\n" "${!glyph}" "'${!glyph}'" "${glyph}"
|
2024-08-27 22:17:29 +02:00
|
|
|
fi
|
|
|
|
done
|