fix: function name typo

This commit is contained in:
2023-11-14 17:13:45 +01:00
parent 7ae365f692
commit 83c5bac1c4

8
agenda
View File

@@ -140,12 +140,12 @@ __edit() {
local base ext slug file local base ext slug file
if [ "$opt_b" = "yes" ]; then if [ "$opt_b" = "yes" ]; then
base="0000-$(___slugify "$*")" base="0000-$(__slugify "$*")"
else else
base=$(date -d "$*" +%F) base=$(date -d "$*" +%F)
fi fi
ext=$opt_e ext=$opt_e
slug=$(___slugify "$opt_t") slug=$(__slugify "$opt_t")
file="$AGENDA_DIR/$slug/$base.$ext" file="$AGENDA_DIR/$slug/$base.$ext"
# Existing files may overwrite the `-e` option. # Existing files may overwrite the `-e` option.
@@ -234,7 +234,7 @@ __list() {
date=$(date -d "$*" +%F) date=$(date -d "$*" +%F)
until=$(date -d "$opt_u" +%F) until=$(date -d "$opt_u" +%F)
if [ -n "$opt_t" ]; then if [ -n "$opt_t" ]; then
slug=$(slugify "$opt_t") slug=$(__slugify "$opt_t")
dir="$AGENDA_DIR/$slug" dir="$AGENDA_DIR/$slug"
else else
dir="$AGENDA_DIR" dir="$AGENDA_DIR"
@@ -323,7 +323,7 @@ __agenda_create() {
} }
# https://stackoverflow.com/a/49035906 # https://stackoverflow.com/a/49035906
___slugify() { __slugify() {
echo "$1" \ echo "$1" \
| iconv -c -t ascii//TRANSLIT \ | iconv -c -t ascii//TRANSLIT \
| sed -E "s/[~^]+//g" \ | sed -E "s/[~^]+//g" \