add another account conf
This commit is contained in:
parent
77b5d2b87a
commit
da5be36ffb
4 changed files with 87 additions and 0 deletions
11
maudin.completions
Normal file
11
maudin.completions
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
# Bookmarks completion using jump plugin
|
||||||
|
compctl -K _completemarks j
|
||||||
|
|
||||||
|
# Path completion on catwich
|
||||||
|
compdef _path_commands catwhich
|
||||||
|
|
||||||
|
# Hostname completion on various ssh commands
|
||||||
|
function _myssh() {compadd $(ls $INFRA/host); compadd $(ls $ROBESPIERRE/ansible/inventory | sed 's/\.yml$//')}
|
||||||
|
compdef _myssh r
|
||||||
|
compdef _myssh ra
|
||||||
|
compdef _myssh tramp
|
||||||
14
maudin.plugins
Normal file
14
maudin.plugins
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
# Bearstech configuration
|
||||||
|
zgen load https://gitea.audin.me/hybris/zsh bearstech.zsh
|
||||||
|
|
||||||
|
# specify plugins here
|
||||||
|
zgen oh-my-zsh
|
||||||
|
zgen oh-my-zsh plugins/colored-man-pages
|
||||||
|
zgen oh-my-zsh plugins/colorize
|
||||||
|
zgen oh-my-zsh plugins/extract
|
||||||
|
zgen oh-my-zsh plugins/git
|
||||||
|
zgen oh-my-zsh plugins/jump
|
||||||
|
zgen oh-my-zsh plugins/keychain
|
||||||
|
zgen oh-my-zsh plugins/rsync
|
||||||
|
zgen oh-my-zsh plugins/systemadmin
|
||||||
|
zgen oh-my-zsh plugins/z
|
||||||
7
maudin.theme
Normal file
7
maudin.theme
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
PROMPT='%{${fg_bold[blue]}%}%n%{$reset_color%}%{${fg[blue]}%}@%m $%{$reset_color%} '
|
||||||
|
RPROMPT='%{$fg[white]%}%~$(git_prompt_info)%{$reset_color%}%(?,,%{${fg_bold[red]}%} [%?]%{$reset_color%})'
|
||||||
|
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg_bold[green]%}("
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[green]%})%{$fg_bold[red]%}!%{$reset_color%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[green]%})"
|
||||||
55
maudin.zsh
Normal file
55
maudin.zsh
Normal file
|
|
@ -0,0 +1,55 @@
|
||||||
|
# keychain
|
||||||
|
zstyle :omz:plugins:keychain agents gpg,ssh
|
||||||
|
zstyle :omz:plugins:keychain identities id_rsa id_bearstech D79CA887
|
||||||
|
zstyle :omz:plugins:keychain options --quiet
|
||||||
|
|
||||||
|
# bip at command end, ensure correct window title
|
||||||
|
function precmd() {
|
||||||
|
echo -n -e "\a"
|
||||||
|
echo -en "\033]0;${USER}@$(hostname)\007"
|
||||||
|
}
|
||||||
|
|
||||||
|
# history file
|
||||||
|
unsetopt share_history
|
||||||
|
setopt INC_APPEND_HISTORY
|
||||||
|
setopt HIST_EXPIRE_DUPS_FIRST
|
||||||
|
HISTSIZE=500000
|
||||||
|
SAVEHIST=500000
|
||||||
|
|
||||||
|
# Disable reserved word foreach
|
||||||
|
disable -r foreach
|
||||||
|
|
||||||
|
# Everyday aliases
|
||||||
|
catwhich() {echo "\e[35mPath: $(which $1)\n\e[39m"; cat $(which $1)}
|
||||||
|
dontknow() {echo -n "¯\\_(ツ)_/¯" | xclip}
|
||||||
|
e() {emacsclient -n $@ > /dev/null 2>&1}
|
||||||
|
tramp() {emacsclient -n $(for x in $@; do echo /root@$x:README; done) > /dev/null 2>&1}
|
||||||
|
fd() {fdfind -H -I -L $@}
|
||||||
|
unifi-balance() {ssh ubnt@192.168.42.1 /opt/vyatta/bin/vyatta-op-cmd-wrapper 'show load-balance watchdog' 2> /dev/null}
|
||||||
|
j() {if [ $# -eq 0 ]; then marks; else jump $@; fi}
|
||||||
|
loop() {while [ 1 ]; do sh -c "$@"; done}
|
||||||
|
noprompt() {if [ "$PROMPT" != '$ ' ]; then export PROMPT='$ '; export RPROMPT=''; else source ~/.zgen/https-COLON--SLASH--SLASH-gitea.audin.me-SLASH-hybris/zsh-master/hybris.theme; fi}
|
||||||
|
open_ports() {if [ $# -eq 1 ] && [ $1 = "public" ]; then sudo netstat -tulpen 2> /dev/null | grep "LISTEN" | grep -v "127.0.0.1"; else sudo netstat -tulpen 2> /dev/null | grep "LISTEN"; fi}
|
||||||
|
r() {if [ $# -gt 0 ]; then for h in $@; do ssh root@$h; done; else sudo su -; fi}
|
||||||
|
ra() {if [ $# -gt 0 ]; then for h in $@; do ssh -A root@$h; done; else sudo su -; fi}
|
||||||
|
|
||||||
|
# Usefull bindings
|
||||||
|
bindkey "^[Od" backward-word
|
||||||
|
bindkey "^[Oc" forward-word
|
||||||
|
|
||||||
|
# Some exports
|
||||||
|
export DISABLE_AUTO_TITLE=true
|
||||||
|
export EDITOR=emacsclient
|
||||||
|
export LESS=-cex2MRX
|
||||||
|
export LESSOPEN='|~/.lessfilter %s'
|
||||||
|
export LOGCHECK=60
|
||||||
|
export READNULLCMD=${PAGER:-/usr/bin/pager}
|
||||||
|
export WATCH=all
|
||||||
|
export WATCHFMT="%n has %a %l from %M"
|
||||||
|
export ROBESPIERRE=/home/hybris/dev/robespierre/infra
|
||||||
|
export PATH=$ROBESPIERRE/bin:$HOME/.scripts:$PATH
|
||||||
|
|
||||||
|
# Fix for compdef, taken from https://github.com/seletskiy/zsh-zgen-compinit-tweak
|
||||||
|
autoload -Uz compinit && compinit -C
|
||||||
|
alias compinit='compinit-zgen'
|
||||||
|
function compinit-zgen() { grep -q ".zgen" <<< "${@}" && \compinit "${@}" }
|
||||||
Loading…
Reference in a new issue