@ -16,7 +16,6 @@ alias wget-opendir='wget --recursive --level 0 --continue --no-clobber \
--reject=html,htm,index'
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) '
if [[ $(uname) == Linux ]]; then
@ -1,5 +1,20 @@
#ft=sh
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 () {
DIR=$(dirname "$1")
FILE=$(basename "$1")
@ -4,6 +4,10 @@ setopt pushdignoredups
setopt histignorealldups
setopt sharehistory
setopt INC_APPEND_HISTORY
setopt HIST_IGNORE_DUPS
setopt EXTENDED_HISTORY
# Use emacs keybindings even if our EDITOR is set to vi
bindkey -e