# Personal zsh configuration.
#
# This file is invoked by all instances of the shell.
#
# Maintainer: Lorenzo Cabrini <lorenzo.cabrini@gmail.com>

# We need to know which system we are on.
if [[ $(uname) == "Linux" ]]; then
    sys=linux
elif [[ $(uname) == "FreeBSD" ]]; then
    sys=bsd
fi

# Aliases
if [[ $sys == linux ]]; then
    alias ls='ls --color -F'
elif [[ $sys == bsd ]]; then
    alias ls='ls -FG'
fi
alias ll='ls -l'
alias la='ls -A'
alias h=history
alias tree='tree -CF'
alias gc='git commit'
alias gst='git status'
alias gp='git push'
alias gpl='git pull'
alias ga='git add'
alias gl='git log'
alias gd='git diff'
alias yd='youtube-dl -f best -o "%(title)s-%(id)s.%(ext)s"'

typeset -U path
path=(~/.local/bin $path)

if [[ -n $(whence vim) ]]; then
    export EDITOR=vim
else
    export EDITOR=vi
fi
export VISUAL=$EDITOR

# Personal zsh configuration.
#
# This file is invoked by all instances of the shell.
#
# Maintainer: Lorenzo Cabrini <lorenzo.cabrini@gmail.com>

# We need to know which system we are on.
if [[ $(uname) == "Linux" ]]; then
    sys=linux
elif [[ $(uname) == "FreeBSD" ]]; then
    sys=bsd
fi

# Aliases
if [[ $sys == linux ]]; then
    alias ls='ls --color -F'
elif [[ $sys == bsd ]]; then
    alias ls='ls -FG'
fi
alias ll='ls -l'
alias la='ls -A'
alias h=history
alias tree='tree -CF'
alias gc='git commit'
alias gst='git status'
alias gp='git push'
alias gpl='git pull'
alias ga='git add'
alias gl='git log'
alias gd='git diff'
alias yd='youtube-dl -f best -o "%(title)s-%(id)s.%(ext)s"'

export GOPATH=$HOME/Go

typeset -U path
path=(~/.local/bin $GOPATH/bin $path)

if [[ -n $(whence vim) ]]; then
    export EDITOR=vim
else
    export EDITOR=vi
fi
export VISUAL=$EDITOR

Set GOPATH and add $GOPATH/bin to $PATH.
Set GOPATH and add $GOPATH/bin to $PATH.
