diff --git a/bearstech.zsh b/bearstech.zsh new file mode 100644 index 0000000..7672bca --- /dev/null +++ b/bearstech.zsh @@ -0,0 +1,16 @@ +# Some exports +export INFRA=/home/hybris/dev/bearstech/bearstech/infra +export PATH=$INFRA/bin:$INFRA/../xen:$PATH + +# Everyday aliases +bthost() {cat $INFRA/host/$1} +dom0() {awk '/Container:/{ print $2}' ${INFRA}/host/${1}} +alerts() {ssh root@pidou monshow | grep -v "none$" | grep -v "^ " | grep -v "^$"} +tickets() {curl "https://maudin:$(/home/hybris/.scripts/keepcli -p Dashbeard)@dashbeard.bearstech.com/api/dashbeard.txt"} +vpn-bear() {for i in $(nmcli con | grep vpn | grep -v -- -- | cut -d' ' -f1); do nmcli con down $i; done; nmcli con up bearstech} + +# Google Cloud +# The next line updates PATH for the Google Cloud SDK. +source '/home/hybris/dev/bearstech/google-cloud-sdk/path.zsh.inc' +# The next line enables shell command completion for gcloud. +source '/home/hybris/dev/bearstech/google-cloud-sdk/completion.zsh.inc' diff --git a/hybris.zsh-theme b/hybris.theme similarity index 100% rename from hybris.zsh-theme rename to hybris.theme diff --git a/hybris.plugin.zsh b/hybris.zsh similarity index 56% rename from hybris.plugin.zsh rename to hybris.zsh index 001e73d..574ada9 100644 --- a/hybris.plugin.zsh +++ b/hybris.zsh @@ -5,7 +5,6 @@ function precmd() {echo -n -e "\a"} unsetopt share_history # Everyday aliases -bthost() {cat $INFRA/host/$1} cless() {for a in $@; do colorize_via_pygmentize $a | less; done} e() {emacsclient -n $@ > /dev/null 2>&1} health() {/usr/bin/screen -O -S health -c ~/.config/screen_health} @@ -17,22 +16,11 @@ r() {if [ $# -eq 1 ]; then ssh root@$1; else sudo su -; fi} # Some exports export EDITOR=emacsclient -export HISTFILE=~/.zhist -export HISTSIZE=5000 -export INFRA=/home/hybris/dev/bearstech/bearstech/infra export LESS=-cex2MRX export LESSOPEN='|~/.lessfilter %s' export LOGCHECK=60 -export PATH=$INFRA/bin:$INFRA/../xen:$HOME/.scripts:$PATH +export PATH=$HOME/.scripts:$PATH export READNULLCMD=${PAGER:-/usr/bin/pager} -export SAVEHIST=5000 export WATCH=all export WATCHFMT="%n has %a %l from %M" -grep "^Subject: " /var/spool/mail/hybris | sed 's/^Subject: / * /' - -# Google Cloud -# The next line updates PATH for the Google Cloud SDK. -source '/home/hybris/dev/bearstech/google-cloud-sdk/path.zsh.inc' -# The next line enables shell command completion for gcloud. -source '/home/hybris/dev/bearstech/google-cloud-sdk/completion.zsh.inc' diff --git a/zshrc b/zshrc index a79b491..86f2921 100644 --- a/zshrc +++ b/zshrc @@ -17,8 +17,9 @@ if ! zgen saved; then zgen oh-my-zsh plugins/z # personnal configuration - zgen load hybris42/zsh hybris.plugin.zsh - zgen load hybris42/zsh hybris.zsh-theme + zgen load hybris42/zsh hybris.zsh + zgen load hybris42/zsh bearstech.zsh + zgen load hybris42/zsh hybris.theme # generate the init script from plugins above zgen save