From 874d3abd108fa38f9446b0767ea4cf12b65b27f5 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 15 Jun 2008 16:09:37 +0200 Subject: Made it more portable --- etc/alias/default | 22 ++++++++++++---------- etc/rc | 2 +- 2 files changed, 13 insertions(+), 11 deletions(-) (limited to 'etc') diff --git a/etc/alias/default b/etc/alias/default index 7841a33..96dae78 100644 --- a/etc/alias/default +++ b/etc/alias/default @@ -4,12 +4,13 @@ alias cp='cp -i' -# The free/used/total space of encfs type filesystems is broken here -linux: alias df='df --human-readable --local --exclude-type=fuse.encfs' -non-linux: alias df='df -hl' +# --human-readable --local +alias df='df -hl' +linux: alias df='df -hl --exclude-type=fuse.encfs' -linux: alias du='du --human-readable --summarize --dereference-args' -non-linux: alias du='du -sh' +# --summarize --human-readable --dereference-args +non-linux: alias du='du -shH' +linux: alias du='du -shD' alias feh='feh --quiet' @@ -30,15 +31,16 @@ alias ifconfig='/sbin/ifconfig' # RAW-CONTROL-CHARS = Don't produce crap if the file contains ANSI color sequences export LESS='--silent --clear-screen --RAW-CONTROL-CHARS --quit-if-one-screen --ignore-case --tabs=5' +# --classify --human-readable # classify = "/" after dirs, "*" after executables etc -linux: alias ls='ls --color=auto --classify --human-readable' -non-linux: alias ls='ls -Fh' +alias ls='ls -Fh' +linux: alias ls='ls -Fh --color=auto' # Somehow folllowing the 'learn something new every day' ;-) -linux: alias man='man --all' -non-linux: alias man='man -a' +alias man='man -a' # Useful on sshfs or similar +# FIXME: this sucks for streams alias mplayer='mplayer -cache 6000 -cache-min 50' alias mv='mv -i' @@ -46,8 +48,8 @@ alias mv='mv -i' alias mx='mx -aZ' # Only TCP/TCP6, not sockets and such +alias netstat='sudo netstat -latp tcp' linux: alias netstat='sudo netstat --program --listening --all --tcp --extend' -non-linux: alias netstat='sudo netstat -latp tcp' # BSD style alias ps='ps aux' diff --git a/etc/rc b/etc/rc index 52bf841..42dcf30 100644 --- a/etc/rc +++ b/etc/rc @@ -3,7 +3,7 @@ ## mostly internal stuff ZDIR=$HOME/packages/zsh/etc uname=$(uname) -debian=$(fgrep Debian /proc/version) +debian=$([ -f /proc/version ] && fgrep Debian /proc/version) alias 'linux:'='[ $uname = Linux ] &&' alias 'non-linux:'='[ $uname = Linux ] ||' alias 'ls-colors:'='which dircolors &> /dev/null &&' -- cgit v1.2.3