Skip to content

Commit

Permalink
alias: restore "susu" alias
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentbernat committed Jun 30, 2020
1 parent 1475bb1 commit 0c97f9c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions rc/alias.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,14 @@ alias -g ,noerr="2> /dev/null"
alias smv='rsync -P --remove-source-files'
(( $+functions[compdef] )) && compdef _ssh smv=scp

# Like sudo -sE but it preserves ZDOTDIR, see:
# <https://sources.debian.org/src/sudo/1.9.1-1/plugins/sudoers/env.c/?hl=187#L187>
suzsh() {
ZDOTDIR=${ZDOTDIR:-$HOME} command sudo \
--preserve-env=ZDOTDIR \
-sE -u ${1:-root}
}

# JSON pretty-printing.
#
# Many programs have a flag to enable unbuffered output. For example,
Expand Down

0 comments on commit 0c97f9c

Please sign in to comment.