X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=shell%2Faliases.in;h=5e9c33a804cf57f77d3cb8ae28d2bbb4ece51e78;hb=577361b1594ffeba12b3bcb454b79e139b04e50a;hp=1211d978d2a160c59ce55f20871ebac54cbac7ea;hpb=c7c76fd58de40b365a671bcc80efeda3e3fcf223;p=config%2Fdotfiles.git diff --git a/shell/aliases.in b/shell/aliases.in index 1211d97..5e9c33a 100644 --- a/shell/aliases.in +++ b/shell/aliases.in @@ -31,19 +31,21 @@ alias t=tig alias v=vim alias x=exit # Shortcuts for a little less used programs. +alias ga='git annex' alias gr=grep 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 tr=tree -# systemd ... +alias te=tree +# systemd ... (sc is provided as shell script for better completoin) alias jc=journalctl alias lc=loginctl -alias sc=systemctl +alias mc=machinectl unalias mv cp 2>/dev/null @@ -70,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 @@ -119,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