aliases 735 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
#!/bin/bash
# This is a ugly hack to assign system wide aliases without changing a bit in
# the bash package.

# enable color support of ls and also add handy aliases
if [ "$TERM" != "dumb" ] && [ -x /usr/bin/dircolors ]; then
    eval "`dircolors -b`"
    alias ls='ls --color=auto'
    alias ll='ls -lh'
    alias la='ls -A'
    alias l='ls -CF'
    alias dir='ls --color=auto --format=vertical'
    alias vdir='ls --color=auto --format=long'

    alias grep='grep --color=auto'
    alias fgrep='fgrep --color=auto'
    alias egrep='egrep --color=auto'

    alias rm='rm -i'

    [ -f /usr/bin/vim ] && alias vi='vim' || alias vi='vim.tiny'
    [ -f /usr/bin/vim ] || alias vim='vim.tiny'

    [ -d /rofs ] && alias su='sudo su'

fi