X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=shell%2Faliases.in;h=69270ccfc261dd4704bda7a20153ff08f6941935;hb=3e17e82d591782b4750382b00c5bf6ee96eddedf;hp=eebda1ec1917c1cba1e15b5e9326f75886db9dab;hpb=10029386b0efedf07dcf368fdb2fcdd1c85017d0;p=config%2Fdotfiles.git diff --git a/shell/aliases.in b/shell/aliases.in index eebda1e..69270cc 100644 --- a/shell/aliases.in +++ b/shell/aliases.in @@ -37,14 +37,15 @@ alias gri='grep -i' alias grr='grep -r' alias grri='grep -ri' alias mc='make clean' -alias mj='make -j' +alias mj='make -j$(nproc)' alias mu=mutt alias rs=reset # like git's reset alias alias sa='ssh-add -t 1h' alias te=tree -# systemd ... (sc is provided as shell script for better completoin) +# systemd ... (sc is provided as shell script for better completion) alias jc=journalctl alias lc=loginctl +alias mc=machinectl unalias mv cp 2>/dev/null @@ -71,7 +72,7 @@ unalias ls 2>/dev/null # See `setup.sh` for details. LS_* are replaced with the appropriate values # when this file is generated. ls() { - LS_ENV command ls LS_COLOR LS_OPTIONS -C -F "$@" 2>&1 | less + LS_ARGS -C -F "$@" 2>&1 | less } unalias ll lt la lal lat 2>/dev/null @@ -120,4 +121,14 @@ info() { command info "$@" 2>/dev/null | less } +# Using su (or sudo) as root to a less privileged user might allow the other +# user to run arbitrary commands as root. See also Debian bugs #628843 and +# #657784. +if test "`id -u`" -eq 0; then + su() { + echo 'never su as root' >&2 + return 1 + } +fi + # vim: ft=sh