blob: 599574ead156b7a4fc5809043c8a7eacfb9534e5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
# 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"
|