From bcc866236cca05f6caf78a6c3d93a63c9bf19f7c Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Sat, 6 Mar 2021 12:31:59 +0100 Subject: add .zshrc, update .vimrc --- .zshrc | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .zshrc (limited to '.zshrc') diff --git a/.zshrc b/.zshrc new file mode 100644 index 0000000..15ed2e8 --- /dev/null +++ b/.zshrc @@ -0,0 +1,48 @@ +# Environment +export YAEGI_DOT_CMD='dotty -' + +# gnuplot display in terminal +export GNUTERM='sixelgd enhanced truecolor font "arial,9"' + +# 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' + +export MANWIDTH=92 + +# Functions +man() { + local width=$(tput cols) + [ $width -gt $MANWIDTH ] && width=$MANWIDTH + env MANWIDTH=$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; } + +# Prompt +source ~/.zsh-powerline.sh + +[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh + -- cgit v1.2.3 From 9aa9c25a4d2ced1ea41d1d981b3fad9fe28a17a6 Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Sat, 6 Mar 2021 16:58:38 +0100 Subject: update --- .zshrc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to '.zshrc') diff --git a/.zshrc b/.zshrc index 15ed2e8..890bfe4 100644 --- a/.zshrc +++ b/.zshrc @@ -22,13 +22,11 @@ alias ll='ls -AFGl' alias ls='ls -AG' alias ya='rlwrap yaegi' -export MANWIDTH=92 - # Functions man() { - local width=$(tput cols) - [ $width -gt $MANWIDTH ] && width=$MANWIDTH - env MANWIDTH=$width man "$@" + local width='' + [ $(tput cols) -gt 88 ] && width='MANWIDTH=88' + env $width man "$@" } meteo() { -- cgit v1.2.3 From 5c75618ff26969654a0572ae00b01f77d1898a71 Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Fri, 12 Mar 2021 13:52:11 +0100 Subject: fix titles --- .zshrc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to '.zshrc') diff --git a/.zshrc b/.zshrc index 890bfe4..9d3ebd2 100644 --- a/.zshrc +++ b/.zshrc @@ -39,6 +39,22 @@ 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 -- cgit v1.2.3 From a8e3586e9b691c2a25b5f2e50a2761d5fcad18f8 Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Fri, 19 Mar 2021 22:27:11 +0100 Subject: update --- .zshrc | 3 +++ 1 file changed, 3 insertions(+) (limited to '.zshrc') diff --git a/.zshrc b/.zshrc index 9d3ebd2..bd67270 100644 --- a/.zshrc +++ b/.zshrc @@ -4,6 +4,9 @@ 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 -- cgit v1.2.3 From ae04cc260d63765fc20a2d7bb21d121986f71445 Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Mon, 29 Mar 2021 10:26:13 +0200 Subject: update --- .zshrc | 3 +++ 1 file changed, 3 insertions(+) (limited to '.zshrc') diff --git a/.zshrc b/.zshrc index bd67270..599574e 100644 --- a/.zshrc +++ b/.zshrc @@ -63,3 +63,6 @@ source ~/.zsh-powerline.sh [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh + +# test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh" + -- cgit v1.2.3 From 6962b31552fbf1a2516b0777cc4a52d99a76f6f2 Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Wed, 5 May 2021 20:32:05 +0200 Subject: update --- .zshrc | 3 +++ 1 file changed, 3 insertions(+) (limited to '.zshrc') diff --git a/.zshrc b/.zshrc index 599574e..fc3b9f9 100644 --- a/.zshrc +++ b/.zshrc @@ -1,5 +1,8 @@ # 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"' -- cgit v1.2.3