some improvements
This commit is contained in:
parent
ed02e9beda
commit
01dbc70660
2 changed files with 13 additions and 4 deletions
|
|
@ -7,8 +7,8 @@ bt-alerts() {ssh root@pidou monshow | grep -v "none$" | grep -v "^ " | g
|
||||||
bt-dom0() {awk '/Container:/{ print $2}' ${INFRA}/host/${1}}
|
bt-dom0() {awk '/Container:/{ print $2}' ${INFRA}/host/${1}}
|
||||||
bt-each() {$INFRA/bin/foreach $@}
|
bt-each() {$INFRA/bin/foreach $@}
|
||||||
bt-host() {cat $INFRA/host/$1}
|
bt-host() {cat $INFRA/host/$1}
|
||||||
|
bt-release() {ssh root@$1 cat /etc/debian_version}
|
||||||
bt-tickets() {echo "Tickets:$(curl -s "https://maudin:$(/home/hybris/.scripts/keepcli -p Dashbeard)@dashbeard.bearstech.com/api/dashbeard.txt")"}
|
bt-tickets() {echo "Tickets:$(curl -s "https://maudin:$(/home/hybris/.scripts/keepcli -p Dashbeard)@dashbeard.bearstech.com/api/dashbeard.txt")"}
|
||||||
bt-vpn() {for i in $(nmcli con | grep vpn | grep -v -- -- | cut -d' ' -f1); do nmcli con down $i; done; nmcli con up bearstech}
|
|
||||||
|
|
||||||
# Google Cloud
|
# Google Cloud
|
||||||
# The next line updates PATH for the Google Cloud SDK.
|
# The next line updates PATH for the Google Cloud SDK.
|
||||||
|
|
@ -17,5 +17,12 @@ source '/home/hybris/dev/bearstech/google-cloud-sdk/path.zsh.inc'
|
||||||
source '/home/hybris/dev/bearstech/google-cloud-sdk/completion.zsh.inc'
|
source '/home/hybris/dev/bearstech/google-cloud-sdk/completion.zsh.inc'
|
||||||
|
|
||||||
# OVH cloud
|
# OVH cloud
|
||||||
nova-env() {source $INFRA/cloud/ovh-$1.env}
|
nova-env() {source $INFRA/cloud/ovh-$1.env}
|
||||||
nova-list() {ls $INFRA/cloud/ovh-*.env | sed "s@$INFRA/cloud/ovh-\(.*\).env@\1@"}
|
|
||||||
|
# Some completion functions
|
||||||
|
_complete_bt-host() {reply=($(ls $INFRA/host))}
|
||||||
|
_complete_nova-env() {reply=($(ls $INFRA/cloud/ovh-*.env | sed "s@$INFRA/cloud/ovh-\(.*\).env@\1@"))}
|
||||||
|
compctl -K _complete_bt-host bt-dom0
|
||||||
|
compctl -K _complete_bt-host bt-host
|
||||||
|
compctl -K _complete_bt-host bt-release
|
||||||
|
compctl -K _complete_nova-env nova-env
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ unsetopt share_history
|
||||||
keychain -q --agents ssh id_rsa id_dsa
|
keychain -q --agents ssh id_rsa id_dsa
|
||||||
|
|
||||||
# Everyday aliases
|
# Everyday aliases
|
||||||
|
ccat() {for a in $@; do colorize_via_pygmentize $a; done}
|
||||||
cless() {for a in $@; do colorize_via_pygmentize $a | less; done}
|
cless() {for a in $@; do colorize_via_pygmentize $a | less; done}
|
||||||
e() {emacsclient -n $@ > /dev/null 2>&1}
|
e() {emacsclient -n $@ > /dev/null 2>&1}
|
||||||
health() {/usr/bin/screen -O -S health -c ~/.config/screen_health}
|
health() {/usr/bin/screen -O -S health -c ~/.config/screen_health}
|
||||||
|
|
@ -32,4 +33,5 @@ export WATCH=all
|
||||||
export WATCHFMT="%n has %a %l from %M"
|
export WATCHFMT="%n has %a %l from %M"
|
||||||
|
|
||||||
# Some completions
|
# Some completions
|
||||||
compctl -K _completemarks j
|
compctl -K _completemarks j
|
||||||
|
compctl -K _complete_bt-host r
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue