Nie jesteś zalogowany.
Jeśli nie posiadasz konta, zarejestruj je już teraz! Pozwoli Ci ono w pełni korzystać z naszego serwisu. Spamerom dziękujemy!
Prosimy o pomoc dla małej Julki — przekaż 1% podatku na Fundacji Dzieciom zdazyć z Pomocą.
Więcej informacji na dug.net.pl/pomagamy/.
Bardzo prosta i pożyteczna zabawa, umieszczasz w tym temacie zawartość swojego pliku inicjującego interaktywną powłokę =]
Oto mój .bashrc:
# 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 # check the window size after each command and, if necessary, # update the values of LINES and COLUMNS. shopt -s checkwinsize # enable color support of ls and also add handy aliases if [ "$TERM" != "dumb" ]; then eval "`dircolors -b`" alias ls='ls --color=auto' fi # set variable identifying the chroot you work in (used in the prompt below) if [ -z "$debian_chroot" -a -r /etc/debian_chroot ]; then debian_chroot=$(cat /etc/debian_chroot) fi # color prompt ^^ PS1='${debian_chroot:+($debian_chroot)}[33[01;32m]u@h[33[00m]:[33[01;34m]w[33[00m]$ ' #PS1='What now, Master?' # If this is an xterm set the title to user@host:dir case "$TERM" in xterm*|rxvt*) PROMPT_COMMAND='echo -ne "33]0;${USER}@${HOSTNAME}: ${PWD}07"' ;; *) ;; esac # blah blah blah. the PATH. export PATH='/bin:/usr/local/bin:/usr/bin:/usr/bin/X11:/usr/games:/home/harry/bin' # Some applications read the EDITOR variable to determine your # favourite text editor. So uncomment the line below and enter the # editor of your choice :-) export EDITOR=/usr/bin/emacs export CVSEDITOR=/usr/bin/emacs # For some news readers it makes sense to specify the NEWSSERVER variable here #export NEWSSERVER=your.news.server # If you want to use a Palm device with Linux, uncomment the two lines # below. For some (older) Palm Pilots, you might need to set a lower # baud rate e.g. 57600 or 38400; lowest is 9600 (very slow!) #export PILOTPORT=/dev/pilot #export PILOTRATE=115200 #aliases # removing tmp or unnecessary files... alias rmbin='rm -i ~/bin/*~' # running X alias x='startx -- ' # damn that ppp alias ppp='~/bin/orange' alias pppstats='/sbin/ifconfig ppp0' alias q='while true; do sleep 60; ppp; done' # aliases for software alias em='emacs -nw' alias eb='emacs -nw ~/.bashrc' alias bug='reportbug' alias aview='asciiview' alias search='apt-cache search' # aliases for ssh connections ^_^ alias sfnet='ssh xxxxx@shell.sourceforge.net' alias phenix='ssh xxxxx@phenix.rootshell.be' alias ss='ssh -X root@localhost' alias ako='ssh harry@ako' # becoming root ;D if [ -x /usr/bin/sux ] ; then alias op='sudo sux -' else alias op='sudo su -' fi # there is a program named op, it acts a little like sudo. # I've discovered it after I got used to this alias. # more software aliases alias post='weblog-post' alias e='$EDITOR' alias o='most' alias cedega='cvscedega' # sometimes I talk to bash. although "FUCK: command not found" is cool, # it is also fun to hear my shell respond to me like human being. alias fuck='echo "yeah fuck$*"' alias WTF='echo "Dont be so surprised. It was told that it wont work."' alias shit='echo " Gufno jest zawsze, zawsze i fszendzie, gufno jest w tobie i we mnie"' alias yeah='echo "Im happy too ^^"' alias wasup='echo "Im ok. And you?"' alias why='echo "Because."' alias bad='echo "Bad command or filename."' alias good='echo "Excellent command or filename!"' # some ls aliases alias ll='ls -l' alias la='ls -A' alias l='ls -CF' # other coreutils aliases alias ..='cd ..' # speak to me... alias ts='festival --tts' # use "command | ts", where command is a program that produces output to stdout
Mówiąc szczerze jest to hybryda standardowego .bashrc z suse 10.1 i debiana sarge, aczkolwiek większość tych aliasów wymyśliłem ja =]
Szczególnie
$ fuck this goddamn shitty $0
pomaga się czasem odstresować =]
Offline
czegoś mi tu brakuje:
alias md='mkdir'
alias rd='rmdir'
alias df='df -h'
alias du='du -h'
alias mkisofs='mkisofs -q -J -R -r'
alias cdrecord='cdrecord gracetime=3'
Offline
Skoro mamy sie chwalić ;-)
dominik@m31-3:~$ grep -v '#' .bashrc
[ -z "$PS1" ] && return
shopt -s checkwinsize
if [ "$TERM" != "dumb" ]; then
eval "`dircolors -b`"
alias ls='ls --color=auto'
fi
if [ -z "$debian_chroot" -a -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
case "$TERM" in
xterm-color)
PS1='${debian_chroot:+($debian_chroot)}[33[01;32m]u@h[33[00m]:[33[01;34m]w[33[00m]$ '
;;
*)
PS1='${debian_chroot:+($debian_chroot)}u@h:w$ '
;;
esac
PS1='${debian_chroot:+($debian_chroot)}[33[01;32m]u@h[33[00m]:[33[01;34m]w[33[00m]$ '
case "$TERM" in
xterm*|rxvt*)
PROMPT_COMMAND='echo -ne "33]0;${USER}@${HOSTNAME}: ${PWD}07"'
;;
*)
;;
esac
export LANG='pl_PL ISO-8859-2'
export LC_ALL='pl_PL'
export CHOST="i586-pc-linux-gnu"
export CFLAGS="-march=k6-2 -Os -pipe -fomit-frame-pointer"
export CXXFLAGS="-march=k6-2 -Os -pipe -fomit-frame-pointer"
export MACHTYPE='i586-pc-linux-gnu'
alias make='make -e'
vman() { man $* | col -b | vless -c 'set ft=man nomod nolist' -; }
alias less='vless'
export XLIB_SKIP_ARGB_VISUALS=1
PATH=/usr/local/java/jdk1.6.0/:"${PATH}"
PATH=/usr/local/java/jdk1.6.0/bin/:"${PATH}"
PATH=/usr/local/java/jdk1.6.0/lib/:"${PATH}"
if ! [ -f /tmp/.disk.sh.PID ] ; then
./src/disk.sh &
fi
//EDIT:
Jeszcze dla roota mam (więcej pod nim kompiluje)
export CHOST="i586-pc-linux-gnu" export CXXHOST="i586-pc-linux-gnu" export CFLAGS="-march=k6-2 -Os -pipe -fomit-frame-pointer" export CXXFLAGS="-march=k6-2 -Os -pipe -fomit-frame-pointer" export MACHTYPE='i586-pc-linux-gnu' export HOSTTYPE='i586' alias make='make -e' #dopełnienie TAB'em nazw pakietów if [ -f /etc/bash_completion ] ; then . /etc/bash_completion fi
Offline
ja w sumie tylko z kolorowego prompta korzystam:
PS1='${debian_chroot:+($debian_chroot)}[33[01;32m]u@h[33[00m]:[33[01;34m]w[33[00m]$ '
aaa.. i polecam kolorowego grep-a:
export GREP_OPTIONS='--color=auto' export GREP_COLOR='1;32'
po skasowaniu GREP_COLOR będzie zaznaczać na czerwono (ja wolę zielony)
Offline
aha, no i jako root mam jeszcze:
alias get='apt-get install' alias getsrc='apt-get source'
Bardzo uprzyjemnia używanie apt-get =]
Offline
Kod:
alias get='apt-get install' alias getsrc='apt-get source'Bardzo uprzyjemnia używanie apt-get =]
Nie lepiej zainstalwoać i używac aptsh?
Offline