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/-/|/'\'''
|
alias lr='ls -R | grep ":$" | sed -e '\''s/:$//'\'' -e '\''s/[^-][^\/]*\//--/g'\'' -e '\''s/^/ /'\'' -e '\''s/-/|/'\'''
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# cat with number on output lines
|
||||||
|
alias ca='cat -n'
|
||||||
|
# docker related
|
||||||
alias d='docker'
|
alias d='docker'
|
||||||
|
# Correct ip command
|
||||||
|
alias ipa='ip a'
|
||||||
|
# less with raw character
|
||||||
|
alias less='less -r'
|
||||||
|
#alias less='less --quiet'
|
||||||
|
|
||||||
# sudo
|
# sudo
|
||||||
## Please consider using "Defaults env_keep+=HOME" configuration in sudoers {{{
|
## Please consider using "Defaults env_keep+=HOME" configuration in sudoers {{{
|
||||||
|
@ -74,6 +82,7 @@ if [ ${USER} != "root" ]; then
|
||||||
alias sz='sudo zsh'
|
alias sz='sudo zsh'
|
||||||
else
|
else
|
||||||
alias sc='systemctl '
|
alias sc='systemctl '
|
||||||
|
alias scu='systemctl --user'
|
||||||
alias sd='docker'
|
alias sd='docker'
|
||||||
alias si='iptables -L -vn '
|
alias si='iptables -L -vn '
|
||||||
alias sj='journalctl '
|
alias sj='journalctl '
|
||||||
|
@ -84,9 +93,6 @@ else
|
||||||
fi
|
fi
|
||||||
## }}}
|
## }}}
|
||||||
|
|
||||||
# Raccourcis pour cat
|
|
||||||
alias ca='cat -n'
|
|
||||||
|
|
||||||
# Envoyer une notification via libnotify-bin (fin d'une commande, ...)
|
# Envoyer une notification via libnotify-bin (fin d'une commande, ...)
|
||||||
# Nécessite le paquet libnotify-bin
|
# 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$//'\'')"'
|
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'
|
alias c='clear'
|
||||||
# Liste le contenu du dossier
|
# Liste le contenu du dossier
|
||||||
alias dir='dir --color=always'
|
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
|
# Page de manuel en anglais
|
||||||
alias mane="LANG=C man "
|
alias mane="LANG=C man "
|
||||||
|
@ -341,10 +342,7 @@ function gpg() {
|
||||||
# ssh
|
# ssh
|
||||||
alias sshdev='ssh -o UserKnownHostsFile=/dev/null'
|
alias sshdev='ssh -o UserKnownHostsFile=/dev/null'
|
||||||
alias scpdev='scp -o UserKnownHostsFile=/dev/null'
|
alias scpdev='scp -o UserKnownHostsFile=/dev/null'
|
||||||
|
alias recossh='source ~/.keychain/cell-info1-sh; !-1'
|
||||||
# systemd
|
|
||||||
alias sctl="systemctl"
|
|
||||||
alias jctl="journalctl"
|
|
||||||
|
|
||||||
# Taskwarrior {{{
|
# Taskwarrior {{{
|
||||||
## Aliases
|
## Aliases
|
||||||
|
@ -451,8 +449,14 @@ zstyle ':completion:*:*:task:*' group-name ''
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
# DebOps {{{
|
# 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
|
## Apply all config to all hosts except the new cluster nodes
|
||||||
alias deal="debops -l 'debops_all_hosts:!physix'"
|
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
|
## Limit to a define host/group
|
||||||
function deho() {
|
function deho() {
|
||||||
if [ ${ANS_HOST} ]; then
|
if [ ${ANS_HOST} ]; then
|
||||||
|
@ -461,12 +465,11 @@ function deho() {
|
||||||
printf '%b' "${MAGENTA}ANS_HOST${RESET} vars is ${REDB}not${RESET} define !\n"
|
printf '%b' "${MAGENTA}ANS_HOST${RESET} vars is ${REDB}not${RESET} define !\n"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
## Limit to a define host/group and to a role
|
## Limit to a define host/group and to a role
|
||||||
function dero() {
|
function dero() {
|
||||||
debops -l "${ANS_HOST}" -t role::"${1}"
|
debops -l "${ANS_HOST}" -t role::"${1}"
|
||||||
}
|
}
|
||||||
## Apply only on new cluster nodes
|
|
||||||
alias decc="debops -l 'physix'"
|
|
||||||
|
|
||||||
# }}}
|
# }}}
|
||||||
# Web apps {{{
|
# Web apps {{{
|
||||||
|
|
Loading…
Reference in New Issue