# -*- sh -*-
#

# Workaround for PATH being wrong in the early stages in nixos
if [ -e /etc/nixos/configuration.nix ]; then
    . /etc/static/profile
fi

. $HOME/.environment

export HISTSIZE=1000000000
if [ -d "$HOME/Sync/shell-history" ]; then
    chmod 700 $HOME/Sync/shell-history
    export HISTFILE=~/Sync/shell-history/zsh_history.$SHORT_HOSTNAME
    chmod 600 $HISTFILE
elif [ -d "$HOME/SparkleShare/shell-history" ]; then
    chmod 700 $HOME/SparkleShare/shell-history
    export HISTFILE=~/SparkleShare/shell-history/zsh_history.$SHORT_HOSTNAME
    chmod 600 $HISTFILE
else
    export HISTFILE=~/.zsh_history
fi
export SAVEHIST=300000000
export WORDCHARS='*?_-.[]~=&;!#$%^(){}<>'

setopt APPEND_HISTORY EXTENDED_HISTORY NO_HIST_IGNORE_SPACE HIST_REDUCE_BLANKS
# XXX: INC_APPEND_HISTORY ?

alias lynx='noglob lynx'
alias wget='noglob wget'
