| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 | #!/bin/bash
## hack to workaround Fedora/Red Hat bug 878428
test -f /usr/share/git-core/contrib/completion/git-prompt.sh \
 && . /usr/share/git-core/contrib/completion/git-prompt.sh
#######################################################
### things to do BEFORE host/user-specific settings ###
#######################################################
### .... ###
### SUBZ ###
### '''' ###
git() {
    if grep -Fwqse "$1" "$GIT_DISABLED_COMMANDS"; then
        echo "You don't want this." >&2
        return 1
    else
        command git "$@"
    fi
}
gitcd() {
    cd "$(git rev-parse --show-toplevel)"
}
clsz() {
    tput clear; tput cup $(tput lines) 0
}
bcdiff() {
    test $# -eq 2 && diff "$@" >/dev/null && return
    bcompare "$@" &
}
### .... ###
### BASH ###
### '''' ###
export HISTCONTROL=erasedups
export HISTIGNORE="$HISTIGNORE:ls:ll:la:cd"
export HISTIGNORE="$HISTIGNORE:git dc:git st"
#export HISTIGNORE="$HISTIGNORE:se *:sc *"
export HISTSIZE=-1
export HISTFILESIZE=100000
export GLOBIGNORE=.:..
# some more aliases
alias cal='cal -m'
alias cls='clear'
alias ll='ls -lh'
alias lla='ls -lha'
alias open='gnome-open'
alias diff='diff -u'
alias pad4='sed -e "s/^/    /"'
alias grep='grep --color --binary-files=without-match'
alias grepr='grep -nr . --exclude-dir=".git" -e '
alias sc='se --direction=encz.cz'
alias lsblk='lsblk -o +UUID,LABEL'
RV_TMP="/tmp/bash-rv"
mkdir -p "$RV_TMP"
### ...... ###
### OTHERS ###
### '''''' ###
export FFOO_PRETTY=color
# make green git bash trinket even cooler
export GIT_PS1_SHOWDIRTYSTATE=true
export GIT_PS1_SHOWUNTRACKEDFILES=true
export GIT_DISABLED_COMMANDS="$HOME/.gittum/disabled-commands"
# disable mounting things like SFTP to ~/.gvfs when accessed
# via GIO (used by nautilus etc.)
export GVFS_DISABLE_FUSE=1
# disable the terrible beep sound (only for X; for tty?, blacklist pcspkr)
[[ ${!DISPLAY[@]} ]] &&  xset b off
# get rid of those .pyc files once and for all
export PYTHONDONTWRITEBYTECODE=1
ssh-add -l >& /dev/null || ssh-add
 |