more clean
This commit is contained in:
parent
76d1341e0c
commit
223c1ee169
5 changed files with 17 additions and 24 deletions
|
|
@ -6,8 +6,8 @@ Zsh configuration using zgen.
|
||||||
```
|
```
|
||||||
$ git clone https://github.com/tarjoilija/zgen.git "${HOME}/.zgen"
|
$ git clone https://github.com/tarjoilija/zgen.git "${HOME}/.zgen"
|
||||||
$ source ${HOME}/.zgen/zgen.zsh
|
$ source ${HOME}/.zgen/zgen.zsh
|
||||||
$ zgen clone https://gitea.audin.me/hybris/zsh
|
$ zgen clone https://forgejo.audin.me/hybris/zsh.git main
|
||||||
$ ln -s ${HOME}/.zgen/https-COLON--SLASH--SLASH-gitea.audin.me-SLASH-hybris/zsh-master/zshrc $HOME/.zshrc
|
$ ln -s ${HOME}/.zgen/https-COLON--SLASH--SLASH-forgejo.audin.me-SLASH-maudin/zsh.git-main/zshrc $HOME/.zshrc
|
||||||
$ zgen reset
|
$ zgen reset
|
||||||
$ source ${HOME}/.zshrc
|
$ source ${HOME}/.zshrc
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
# Some exports
|
|
||||||
export INFRA=/home/${USER}/dev/bearstech/infra
|
|
||||||
export PATH=$INFRA/bin:$INFRA/service/xen:$PATH
|
|
||||||
|
|
||||||
# Everyday aliases
|
|
||||||
bt-alerts() {ssh root@${1:-pidou} monshow | grep -v "none$"}
|
|
||||||
bt-release() {ssh root@$1 cat /etc/debian_version}
|
|
||||||
|
|
||||||
# Some completion functions
|
|
||||||
_complete_bt-host() {reply=($(ls $INFRA/host))}
|
|
||||||
compctl -K _complete_bt-host bt-dom0
|
|
||||||
compctl -K _complete_bt-host infra host
|
|
||||||
compctl -K _complete_bt-host bt-release
|
|
||||||
|
|
@ -1,11 +1,12 @@
|
||||||
# Bookmarks completion using jump plugin
|
# Bookmarks completion using jump plugin
|
||||||
compctl -K _completemarks j
|
compctl -K _completemarks j
|
||||||
|
|
||||||
# Path completion on catwich
|
|
||||||
compdef _path_commands catwhich
|
|
||||||
|
|
||||||
# Hostname completion on various ssh commands
|
# Hostname completion on various ssh commands
|
||||||
function _myssh() {compadd $(ls $INFRA/host); compadd $(ls $ROBESPIERRE/ansible/inventory | sed 's/\.yml$//')}
|
function _myssh() {compadd $(ls $INFRA/host))}
|
||||||
compdef _myssh r
|
compdef _myssh r
|
||||||
compdef _myssh ra
|
compdef _myssh ra
|
||||||
compdef _myssh tramp
|
compdef _myssh tramp
|
||||||
|
|
||||||
|
_complete_bt-host() {reply=($(ls $INFRA/host))}
|
||||||
|
compctl -K _complete_bt-host infra host
|
||||||
|
compctl -K _complete_bt-host debian-release
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,3 @@
|
||||||
# Bearstech configuration
|
|
||||||
zgen load https://gitea.audin.me/hybris/zsh bearstech.zsh
|
|
||||||
|
|
||||||
# specify plugins here
|
# specify plugins here
|
||||||
zgen oh-my-zsh
|
zgen oh-my-zsh
|
||||||
zgen oh-my-zsh plugins/colored-man-pages
|
zgen oh-my-zsh plugins/colored-man-pages
|
||||||
|
|
|
||||||
12
maudin.zsh
12
maudin.zsh
|
|
@ -6,7 +6,6 @@ zstyle :omz:plugins:keychain options --quiet
|
||||||
# bip at command end, ensure correct window title
|
# bip at command end, ensure correct window title
|
||||||
function precmd() {
|
function precmd() {
|
||||||
echo -n -e "\a"
|
echo -n -e "\a"
|
||||||
echo -en "\033]0;${USER}@$(hostname)\007"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# history file
|
# history file
|
||||||
|
|
@ -20,6 +19,8 @@ SAVEHIST=500000
|
||||||
disable -r foreach
|
disable -r foreach
|
||||||
|
|
||||||
# Everyday aliases
|
# Everyday aliases
|
||||||
|
bt-alerts() {ssh root@${1:-pidou} monshow | grep -v "none$"}
|
||||||
|
debian-release() {ssh root@$1 cat /etc/debian_version}
|
||||||
dontknow() {echo -n "¯\\_(ツ)_/¯" | xclip}
|
dontknow() {echo -n "¯\\_(ツ)_/¯" | xclip}
|
||||||
e() {emacsclient -n $@ > /dev/null 2>&1}
|
e() {emacsclient -n $@ > /dev/null 2>&1}
|
||||||
tramp() {emacsclient -n $(for x in $@; do echo /root@$x:README; done) > /dev/null 2>&1}
|
tramp() {emacsclient -n $(for x in $@; do echo /root@$x:README; done) > /dev/null 2>&1}
|
||||||
|
|
@ -36,13 +37,20 @@ bindkey "^[Oc" forward-word
|
||||||
# Some exports
|
# Some exports
|
||||||
export DISABLE_AUTO_TITLE=true
|
export DISABLE_AUTO_TITLE=true
|
||||||
export EDITOR=emacsclient
|
export EDITOR=emacsclient
|
||||||
|
export INFRA=/home/${USER}/dev/bearstech/infra
|
||||||
export LESS=-cex2MRX
|
export LESS=-cex2MRX
|
||||||
export LESSOPEN='|~/.lessfilter %s'
|
export LESSOPEN='|~/.lessfilter %s'
|
||||||
export LOGCHECK=60
|
export LOGCHECK=60
|
||||||
export READNULLCMD=${PAGER:-/usr/bin/pager}
|
export READNULLCMD=${PAGER:-/usr/bin/pager}
|
||||||
export WATCH=all
|
export WATCH=all
|
||||||
export WATCHFMT="%n has %a %l from %M"
|
export WATCHFMT="%n has %a %l from %M"
|
||||||
export PATH=$ROBESPIERRE/bin:$HOME/.scripts:$PATH
|
export PATH=$HOME/.scripts:$INFRA/bin:$INFRA/service/xen:$PATH
|
||||||
|
|
||||||
|
# Some completion functions
|
||||||
|
_complete_bt-host() {reply=($(ls $INFRA/host))}
|
||||||
|
compctl -K _complete_bt-host bt-dom0
|
||||||
|
compctl -K _complete_bt-host infra host
|
||||||
|
compctl -K _complete_bt-host bt-release
|
||||||
|
|
||||||
# Fix for compdef, taken from https://github.com/seletskiy/zsh-zgen-compinit-tweak
|
# Fix for compdef, taken from https://github.com/seletskiy/zsh-zgen-compinit-tweak
|
||||||
autoload -Uz compinit && compinit -C
|
autoload -Uz compinit && compinit -C
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue