dotfiles/zsh/.zshrc
2024-01-03 12:06:57 +01:00

369 lines
6.5 KiB
Bash
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

export PATH=$HOME/bins/toolbox:$HOME/.cargo/bin:$HOME/.local/bin:/usr/local/bin:$HOME/.pyenv/bin:$HOME/hosting-run-scripts/:$PATH
export ZSH=$HOME/.oh-my-zsh
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="agnoster"
HOST_COLOR=$(hostname -f | xxd -u -ps -s 5 -l 3 || 'FF0000')
# CASE_SENSITIVE="true"
# HYPHEN_INSENSITIVE="true"
DISABLE_AUTO_UPDATE="false"
DEFAULT_USER=$USER
# export UPDATE_ZSH_DAYS=13
# DISABLE_LS_COLORS="true"
# DISABLE_AUTO_TITLE="true"
# ENABLE_CORRECTION="true"
# Uncomment the following line to display red dots whilst waiting for completion.
# COMPLETION_WAITING_DOTS="true"
# DISABLE_UNTRACKED_FILES_DIRTY="true"
HIST_STAMPS="yyyy-mm-dd"
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"
# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(
adb
#ant
#apache2-macports
#arcanist
archlinux
#asdf
#autoenv
#autojump
#autopep8
#aws
#battery
#bbedit
#bgnotify
#boot2docker
bower
branch
#brew
#bundler
#bwana
#cabal
#cake
#cakephp3
#capistrano
#cargo
#cask
#catimg
#celery
#chruby
#chucknorris
#cloudapp
#codeclimate
#coffee
#colemak
colored-man-pages
colorize
#command-not-found
#common-aliases
#compleat
composer
#copybuffer
#copydir
#copyfile
cp
#cpanm
debian
#dircycle
#dirhistory
#dirpersist
#django
#dnf
docker
docker-compose
#docker-machine
#dotenv
#droplr
#eecms
#emacs
#ember-cli
emoji
#emoji-clock
#emotty
encode64
#extract
#fabric
#fancy-ctrl-z
#fasd
#fastfile
#fbterm
#fedora
#firewalld
#forklift
#fossil
#frontend-search
#gas
#gb
#geeknote
#gem
git
git-extras
#git-flow
#git-flow-avh
#git-hubflow
#git-prompt
#git-remote-branch
#gitfast
#github
gitignore
#glassfish
#globalias
gnu-utils
golang
gpg-agent
#gradle
#grails
#grunt
#gulp
#hanami
#helm
#heroku
history
#history-substring-search
#httpie
iterm2
#iwhois
#jake-node
#jhbuild
#jira
#jruby
jsontools
#jump
#kate
#kitchen
#knife
#knife_ssh
#kops
#kube-ps1
#kubectl
#laravel
#laravel4
#laravel5
#last-working-dir
#lein
#lighthouse
#lol
#macports
man
#marked2
#mercurial
#meteor
#minikube
#mix
#mix-fast
#mosh
#mvn
#mysql-macports
#n98-magerun
nanoc
#ng
#nix
#nmap
node
#nomad
npm
#npx
#nvm
#nyan
#oc
#osx
#pass
#paver
#pep8
#per-directory-history
#perl
#perms
#phing
pip
#pj
#pod
postgres
#pow
#powder
#powify
#profiles
pyenv
pylint
python
#rails
#rake
#rake-fast
#rand-quote
#rbenv
#rbfu
#react-native
#rebar
redis-cli
#repo
rsync
#ruby
rust
#rvm
#safe-paste
#sbt
#scala
#scd
#screen
#scw
#sfffe
#shrink-path
#singlechar
#spring
#sprunge
ssh-agent
#stack
#sublime
sudo
supervisor
#suse
#svn
#svn-fast-info
#swiftpm
#symfony
#symfony2
#systemadmin
systemd
#taskwarrior
#terminalapp
#terminitor
#terraform
#textastic
#textmate
#thefuck
#themes
#thor
#tig
tmux
#tmux-cssh
#tmuxinator
#torrent
#tugboat
ubuntu
#urltools
vagrant
vault
#vi-mode
#vim-interaction
#virtualenv
#virtualenvwrapper
#vundle
#wakeonlan
#wd
#web-search
#wp-cli
#xcode
#yarn
#yii
#yii2
#yum
#z
#zeus
#zsh-navigation-tools
#zsh_reload
)
zstyle :omz:plugins:ssh-agent agent-forwarding on
zstyle :omz:plugins:ssh-agent identities $(hostname -f)
zstyle :omz:plugins:ssh-agent lifetime 4h
source $ZSH/oh-my-zsh.sh
# User configuration
# export MANPATH="/usr/local/man:$MANPATH"
# export LANG=en_US.UTF-8
# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR='vim'
# else
# export EDITOR='mvim'
# fi
export EDITOR='hx'
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
# ssh
# export SSH_KEY_PATH="~/.ssh/rsa_id"
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
HISTFILE="$HOME/.zshistory"
HISTSIZE=200000
SAVEHIST=100000
alias hist='history -D -E'
setopt hist_ignore_dups
#export TERM=rxvt-unicode-256color
unsetopt rm_star_silent
setopt auto_pushd
# export SSH_KEY_PATH="~/.ssh/id_ed25519"
status() {
print ""
print "Date..: "$(date "+%Y-%m-%d %H:%M:%S")""
print "Shell.: Zsh $ZSH_VERSION (PID = $$, $SHLVL nests)"
print "Term..: $TTY ($TERM), $BAUD bauds, $COLUMNS x $LINES cars"
print "Login.: $LOGNAME (UID = $EUID) on $HOST"
print "System: $(cat /etc/[A-Za-z]*[_-][rv]e[lr]*)"
print "Uptime:$(uptime)"
print ""
}
alias kbe='setxkbmap be'
alias kus='setxkbmap us'
alias dl='wget -r -k -T 5 -t 2 -U '\''Mozilla/5.0 (X11; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0'\'' '
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias flip='shuf -i 0-1 -n 1 | sed -e '\''s/1/Pile/'\'' -e '\''s/0/Face/'\'''
alias grep='grep --color=auto'
alias ls='ls --classify --tabsize=0 --literal --color=auto --show-control-chars --human-readable'
alias l='ls -CF'
alias la='ls -A'
alias ll='ls -lah'
alias osj='openstack -f json'
alias osc='openstack console log show'
alias oss='openstack server'
alias psa='ps auxwwwf'
alias toph='top -cHd1'
alias ip="ip --color"
alias gw01='z3 gw01.infra.mps.gs.ovh.net'
alias hr-admin='z3 root@hr-admin.rungs.ovh'
alias public='z3 root@public01.infra.gs.ovh.net'
alias thot_cloudweb-robot-preprod='thot '\''wss://thot.ovh.com/tail/?tk=c89ec346-ce0d-4504-b69b-b3c216e91385'\'''
alias thot_reseller-robot-preprod='thot '\''wss://thot.ovh.com/tail/?tk=e4bdf746-d041-41d3-81a5-7e4629d3e507'\'''
alias m5='sm3 ovh@mozg-mutu5.ovh.ha.ovh.net'
alias melt='sm3 gs@mozg-meltingpot.ovh.ha.ovh.net'
alias mis='sm3 mozg-mis.ovh.ha.ovh.net'
alias logalert='sm3 --osh logovh --log alert | grep -E "MUTU|INTERNE|CLOUDWEB"'
alias evilssh='ssh sm3.ovh.net -- --osh selfForgetHostKey --host mis-reseller.lb.engine.ha.ovh.net --port 10666 && ssh -t sm3.ovh.net -- root@mis-reseller.lb.engine.ha.ovh.net -p 10666'
if [ -f ~/.webhosting/activate ]; then source ~/.webhosting/activate; fi
autoload -Uz compinit
zstyle ':completion:*' menu select
fpath+=~/.zfunc
fpath+=${ZDOTDIR:-~}/.zsh_functions
alias bat=batcat
alias osm="openstack --os-cloud management_stack"
alias osmb="openstack --os-cloud management_stack_sbg"
alias osmd="openstack --os-cloud management_stack_de"
export BASTION_CONF_FILE=~/.config/ovh/bastion.env
VAULT_ADDR="https://vault.ood.ovh:8200"