Add environment preservation for somes sudo cmd.

This commit is contained in:
Jeremy Gardais 2017-08-04 09:08:49 +02:00
parent dafba02f5f
commit 90cd20d3e0
1 changed files with 4 additions and 4 deletions

8
zshrc
View File

@ -38,13 +38,13 @@ alias lr='ls -R | grep ":$" | sed -e '\''s/:$//'\'' -e '\''s/[^-][^\/]*\//--/g'\
# Faire en sorte que sudo puisse également utiliser les alias! (c'est l'espace qui fait toute la différence) # Faire en sorte que sudo puisse également utiliser les alias! (c'est l'espace qui fait toute la différence)
# `man zshall` partie Aliasing: "If the text ends with a space, the next word in the shell input is treated as though it were in command position for # `man zshall` partie Aliasing: "If the text ends with a space, the next word in the shell input is treated as though it were in command position for
# purposes of alias expansion. " # purposes of alias expansion. "
alias sudo='sudo ' alias sudo='sudo -E '
alias s='sudo ' alias s='sudo -E '
if [ ${USER} != "root" ]; then if [ ${USER} != "root" ]; then
alias si='sudo iptables -L -vn ' alias si='sudo iptables -L -vn '
alias sp='sudo puppet agent -t ' alias sp='sudo puppet agent -t '
alias sv='sudo vi ' alias sv='sudo -E vi '
alias sz='sudo -i ' alias sz='sudo -E zsh'
alias sd='sudo docker' alias sd='sudo docker'
else else
alias si='iptables -L -vn ' alias si='iptables -L -vn '