# Environment export YAEGI_DOT_CMD='dotty -' # gnuplot display in terminal export GNUTERM='sixelgd enhanced truecolor font "arial,9"' # Terraform-perf export TFP=$HOME/src/github.com/traefik/terraform-perf # Auto completion FPATH=/opt/homebrew/share/zsh-completions:/opt/homebrew/share/zsh/site-functions:$FPATH autoload -Uz compinit && compinit setopt share_history # Aliases alias pt='sudo port -v' alias pu='pt selfupdate && pt upgrade outdated' alias by='go build ./cmd/yaegi' alias cy='cd ~/go/src/github.com/traefik/yaegi' alias dotfiles='git --git-dir=$HOME/dotfiles --work-tree=$HOME' #alias git='hub' alias ll='ls -AFGl' alias ls='ls -AG' alias ya='rlwrap yaegi' # Functions man() { local width='' [ $(tput cols) -gt 88 ] && width='MANWIDTH=88' env $width man "$@" } meteo() { local request="wttr.in/${1-Toulouse}?F&T" [ "$(tput cols)" -lt 125 ] && request+='&n' curl -H "Accept-Language: fr" --compressed "$request" } p() { [ -f "$1" -a ! -x "$1" ] && less -XF $1 || "$@" 2>&1 | less -XF ; } ty() { go test -v -short ./interp; } # Term title management function set-term-title-precmd() { emulate -L zsh print -rn -- $'\e]0;'${(V%):-'%~'}$'\a' >$TTY } function set-term-title-preexec() { emulate -L zsh print -rn -- $'\e]0;'${(V)1}$'\a' >$TTY } autoload -Uz add-zsh-hook add-zsh-hook preexec set-term-title-preexec add-zsh-hook precmd set-term-title-precmd set-term-title-precmd # Prompt source ~/.zsh-powerline.sh [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh # test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh"