move slugify alias to profile

main
Buddy Sandidge 4 years ago
parent c825a836a9
commit f0bd1541d7

@ -16,7 +16,6 @@ alias wget-opendir='wget --recursive --level 0 --continue --no-clobber \
--reject=html,htm,index' --reject=html,htm,index'
alias numfiles='find . -maxdepth 1 -type f | wc -l' alias numfiles='find . -maxdepth 1 -type f | wc -l'
alias slugify="sed -e 's/[^[:alnum:]]/-/g' | tr -s '-' | tr A-Z a-z"
alias take='sudo chown $(whoami):$(whoami) ' alias take='sudo chown $(whoami):$(whoami) '
if [[ $(uname) == Linux ]]; then if [[ $(uname) == Linux ]]; then

@ -1,5 +1,20 @@
#ft=sh #ft=sh
alias slugify="sed -e 's/[^[:alnum:]]/-/g' | tr -s '-' | tr A-Z a-z"
source_env_file () {
file="${1}"
if [ ! -f "${file}" ]; then
return
fi
eval "$(
grep -v '^\s*\#' "${file}" |
grep -v '^\s*$' |
sed 's/^\s*export//g' |
sed 's/^/export /g'
)"
}
add_date_prefix () { add_date_prefix () {
DIR=$(dirname "$1") DIR=$(dirname "$1")
FILE=$(basename "$1") FILE=$(basename "$1")

@ -4,6 +4,10 @@ setopt pushdignoredups
setopt histignorealldups setopt histignorealldups
setopt sharehistory setopt sharehistory
setopt INC_APPEND_HISTORY
setopt HIST_IGNORE_DUPS
setopt EXTENDED_HISTORY
# Use emacs keybindings even if our EDITOR is set to vi # Use emacs keybindings even if our EDITOR is set to vi
bindkey -e bindkey -e

Loading…
Cancel
Save