summaryrefslogtreecommitdiff
path: root/.zshrc
diff options
context:
space:
mode:
authorMarc Vertes <mvertes@free.fr>2022-02-03 14:39:21 +0100
committerMarc Vertes <mvertes@free.fr>2022-02-03 14:39:21 +0100
commit70375b4962152133c0423115427d7eaa006822d6 (patch)
treed5608c6638f202ff17566fce60b5460da1d26304 /.zshrc
parent053556962bb2d29ac76bcca51cabd1df238f80e3 (diff)
parente200c8d78ca1d3388c25c1cef8892b1dd015bbf7 (diff)
update
Diffstat (limited to '.zshrc')
-rw-r--r--.zshrc71
1 files changed, 71 insertions, 0 deletions
diff --git a/.zshrc b/.zshrc
new file mode 100644
index 0000000..fc3b9f9
--- /dev/null
+++ b/.zshrc
@@ -0,0 +1,71 @@
+# Environment
+export YAEGI_DOT_CMD='dotty -'
+export YAEGI_UNSAFE=1
+export YAEGI_UNRESTRICTED=1
+export YAEGI_SYSCALL=1
+
+# 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"
+