X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=shell%2Faliases.in;h=cb59d9c4fc3953ba3595930c93702099b3be0600;hb=d80ef8ee3f9d24ae0a17ec15eaf6137ab7781b7f;hp=ef3b19fa21a73bdd3be7e742299b858a6ec01bff;hpb=64b4f4a04f6f8989a4621c53333e5dc66960b586;p=config%2Fdotfiles.git diff --git a/shell/aliases.in b/shell/aliases.in index ef3b19f..cb59d9c 100644 --- a/shell/aliases.in +++ b/shell/aliases.in @@ -31,6 +31,7 @@ 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' @@ -38,12 +39,12 @@ alias grri='grep -ri' alias mc='make clean' alias mj='make -j' alias mu=mutt +alias rs=reset # like git's reset alias alias sa='ssh-add -t 1h' alias te=tree -# systemd ... +# systemd ... (sc is provided as shell script for better completoin) alias jc=journalctl alias lc=loginctl -alias sc=systemctl unalias mv cp 2>/dev/null @@ -70,7 +71,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 +120,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