Add missing aliases
This commit is contained in:
parent
5ea8de99b8
commit
815ad39809
31
zshrc
31
zshrc
|
@ -49,7 +49,15 @@ else
|
|||
alias lr='ls -R | grep ":$" | sed -e '\''s/:$//'\'' -e '\''s/[^-][^\/]*\//--/g'\'' -e '\''s/^/ /'\'' -e '\''s/-/|/'\'''
|
||||
fi
|
||||
|
||||
# cat with number on output lines
|
||||
alias ca='cat -n'
|
||||
# docker related
|
||||
alias d='docker'
|
||||
# Correct ip command
|
||||
alias ipa='ip a'
|
||||
# less with raw character
|
||||
alias less='less -r'
|
||||
#alias less='less --quiet'
|
||||
|
||||
# sudo
|
||||
## Please consider using "Defaults env_keep+=HOME" configuration in sudoers {{{
|
||||
|
@ -74,6 +82,7 @@ if [ ${USER} != "root" ]; then
|
|||
alias sz='sudo zsh'
|
||||
else
|
||||
alias sc='systemctl '
|
||||
alias scu='systemctl --user'
|
||||
alias sd='docker'
|
||||
alias si='iptables -L -vn '
|
||||
alias sj='journalctl '
|
||||
|
@ -84,9 +93,6 @@ else
|
|||
fi
|
||||
## }}}
|
||||
|
||||
# Raccourcis pour cat
|
||||
alias ca='cat -n'
|
||||
|
||||
# Envoyer une notification via libnotify-bin (fin d'une commande, ...)
|
||||
# Nécessite le paquet libnotify-bin
|
||||
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
|
||||
|
@ -95,11 +101,6 @@ alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo
|
|||
alias c='clear'
|
||||
# Liste le contenu du dossier
|
||||
alias dir='dir --color=always'
|
||||
# Correct ip command
|
||||
alias ipa='ip a'
|
||||
# Pour utiliser less avec de la couleur par défaut
|
||||
alias less='less -r'
|
||||
#alias less='less --quiet'
|
||||
|
||||
# Page de manuel en anglais
|
||||
alias mane="LANG=C man "
|
||||
|
@ -341,10 +342,7 @@ function gpg() {
|
|||
# ssh
|
||||
alias sshdev='ssh -o UserKnownHostsFile=/dev/null'
|
||||
alias scpdev='scp -o UserKnownHostsFile=/dev/null'
|
||||
|
||||
# systemd
|
||||
alias sctl="systemctl"
|
||||
alias jctl="journalctl"
|
||||
alias recossh='source ~/.keychain/cell-info1-sh; !-1'
|
||||
|
||||
# Taskwarrior {{{
|
||||
## Aliases
|
||||
|
@ -451,8 +449,14 @@ zstyle ':completion:*:*:task:*' group-name ''
|
|||
# }}}
|
||||
|
||||
# DebOps {{{
|
||||
## Direct access to DebOps's roles directory
|
||||
hash -d dero="${HOME}/.local/share/debops/debops/ansible/roles/"
|
||||
|
||||
## Apply all config to all hosts except the new cluster nodes
|
||||
alias deal="debops -l 'debops_all_hosts:!physix'"
|
||||
## Apply only on new cluster nodes
|
||||
alias decc="debops -l 'physix'"
|
||||
|
||||
## Limit to a define host/group
|
||||
function deho() {
|
||||
if [ ${ANS_HOST} ]; then
|
||||
|
@ -461,12 +465,11 @@ function deho() {
|
|||
printf '%b' "${MAGENTA}ANS_HOST${RESET} vars is ${REDB}not${RESET} define !\n"
|
||||
fi
|
||||
}
|
||||
|
||||
## Limit to a define host/group and to a role
|
||||
function dero() {
|
||||
debops -l "${ANS_HOST}" -t role::"${1}"
|
||||
}
|
||||
## Apply only on new cluster nodes
|
||||
alias decc="debops -l 'physix'"
|
||||
|
||||
# }}}
|
||||
# Web apps {{{
|
||||
|
|
Loading…
Reference in New Issue