Update fzf scripts

This commit is contained in:
2022-10-25 21:29:26 +02:00
parent 23f6d6f1b4
commit cac2e1a74e
3 changed files with 8 additions and 6 deletions

View File

@@ -11,11 +11,12 @@ update() {
font_list=$(fc-list -f "%{fullname}\n")
echo "$font_list" | while read -r line ; do
echo "$font_list" | while read line ; do
first="$(echo "$line" | cut -d',' -f1)"
last="$(echo "$line" | cut -d',' -f2)"
if "$(contains_dash "$first")"; then
if $(contains_dash "$first"); then
echo "$last" >> "$fn"
else
echo "$first" >> "$fn"
@@ -25,5 +26,5 @@ update() {
case "$1" in
--update) update;;
*) sort "$fn" | uniq | awk 'NF' | fzf;;
*) cat "$fn" | sort | uniq | awk 'NF' | fzf;;
esac