@ -1,7 +1,5 @@
#ft=sh
alias slugify="sed -e 's/[^[:alnum:]]/-/g' | tr -s '-' | tr A-Z a-z"
if type nvim >/dev/null 2>/dev/null ; then
export EDITOR=nvim
alias vim=nvim
@ -9,6 +7,17 @@ else
export EDITOR=vim
fi
slugify () (
if [ "$#" -ne 0 ] ; then
echo "$@" | slugify
else
iconv --to-code ascii//TRANSLIT |
sed -E 's/[^a-zA-Z0-9]+/-/g' |
sed -E 's/^-+\|-+$//g' |
tr '[:upper:]' '[:lower:]'
)
source_env_file () {
if [ ! -f "${1}" ]; then
return