Die ultimative .bashrc

Hi,

keine schlechte Idee mit dem wiederbeleben.

In meiner bashrc stehen auch einige Dinge die heutzutage wenigstens bei Ubuntu standard sind, aber da ich manche davon hier noch nicht gesehen hab, lass ich sie mal drin.

Code:
# ~/.bashrc: executed by bash(1) for non-login shells.

# If not running interactively, don't do anything
[ -z "$PS1" ] && return

# don't put duplicate lines in the history. See bash(1) for more options
# export HISTCONTROL=ignoredups
# ... and ignore same sucessive entries.
export HISTCONTROL=ignoreboth

# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(lesspipe)"

# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
    debian_chroot=$(cat /etc/debian_chroot)
fi

# set prompt
PS1='[\t][$SHLVL:${debian_chroot:+($debian_chroot)}\u@\h:\!:\w]\$ '

# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
    PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"'
    ;;
*)
    ;;
esac

# enable color support of ls and also add handy aliases
if [ "$TERM" != "dumb" ]; then
    eval "`dircolors -b`"
    alias ls='ls --color=auto'
fi

# enable programmable completion features
if [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
fi

# use the program birthday to show upcoming birthdays
echo $(birthday)
echo

# disable immediate exit on EOF (ctrl-d)
export IGNOREEOF=2 # 3 EOFs in a row lead to exit

# set cdpath to the home directory of the user, so that you can
# change directory into a subdirectory of home from everywhere.
CDPATH=:$HOME:

# the part that corresponds to ssh-agent
[ -z "$SSH_CLIENT" ] && . $HOME/.ssh-agent

alias keyon="ssh-add -t 10800"
alias keyoff='ssh-add -D'
alias keylist='ssh-add -l'

alias pu='pushd'
alias po='popd'

alias apt-get-rs='apt-get install -o APT::Install-Suggests="true" -o APT::Install-Recommends="true"'

# variables used for debian/ubuntu packaging
export DEBFULLNAME="Foo Bar"
export DEBEMAIL="foo@bar.de"

export EDITOR=emacs
export VISUAL=$EDITOR
export PAGER=less

mfg,
bytepool
 
Also ich habe bei mir nur das notwendige drinnen stehen, ich habe zwar keine .bashrc, aber die .cshrc zählt ja bestimmt auch :)

Code:
alias h		history 100 
alias j		jobs -l
alias la	ls -a
alias lf	ls -FA
alias ll	ls -lA
alias ls	ls -G

Und noch ein paar Spielchen für eine Meldung beim vorhanden sein von neuen Mails im Postfach :)

In diesem Sinne
 
Code:
grep -Ev '^#|^$' .bashrc 
export PATH=/opt/hxtools/bin:$PATH
export HISTSIZE=2000
export OSC_BUILD_ROOT=/tmp/build-root
test -s ~/.alias && . ~/.alias || true
alias zup='su -c "zypper up"'
alias zdup='su -c "zypper dup"'
alias zref='su -c "zypper ref"'
alias mane='man -L=en'
alias isomount='sudo /bin/mount -o loop -t iso9660'
alias isoumount='sudo /bin/umount /mnt/isos/'
[B][COLOR="RED"]alias Ahnung='echo "Wenn man keine Ahnung hat, einfach mal die Fresse halten."'[/COLOR][/B]
alias cleanbuildroot='if [ -d $OSC_BUILD_ROOT ] ; then echo "lösche $OSC_BUILD_ROOT" ; su -c "rm -rf $OSC_BUILD_ROOT"; else echo "Nichts zu tun" ; fi'
alias tcpdump='sudo /usr/sbin/tcpdump -Z XXXX'
if [[ $WINDOWMANAGER = /usr/bin/startfluxbox ]] ; then
alias konsole='konsole --schema RotaufSchwarz.schema'
alias xterm='xterm +sb -fg red4 -bg black -geometry 104x29 -cr red3 -fn -*-fixed-*-r-*-*-16-*-*-*-*-*-*-*'
fi
Der wichtigste alias ist rot hervorgehoben (den braucht man mindestens 3 mal täglich, egal ob vor oder nach dem Essen).
 

Ähnliche Themen

Skript soll nicht doppelt laufen... kill pkill pid cron

Skript bei Lubuntu nach jedem Start ausführen

Queue für copy Script

Shell-Skript nicht doppelt starten

Gnome Classic Desktop: Home-Inhalt Icons ausblenden

Zurück
Oben