Pastebin
Paste #133:
< previous paste - next paste>
Pasted by tdn
.bash_prompt
1 # set a fancy prompt (non-color, unless we know we "want" color)
2 case "$TERM" in
3 xterm-color)
4 export PS1="\[^[[01;34m\](\[^[[00m\]\[^[[01;32m\]\u\[^[[00m\]\[^[[01;34m\]@\[^[[00m\]\[^[[01;32m\]\h.`dnsdomainname`\[^[[00m\]\[^[[01;34m\]) (\[^[[01;32m\]\d \@ \[^[[01;34m\]) {\[^[[01;32m\]P:\j H:\!\[^[[01;34m\]}\n(\w)\[^[[00m\] "
5 ;;
6 *)
7 export PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
8 ;;
9 esac
.bashrc
1 # ~/.bashrc: executed by bash(1) for non-login shells.
2 # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
3 # for examples
4
5 # If not running interactively, don't do anything
6 [ -z "$PS1" ] && return
7
8 # don't put duplicate lines in the history. See bash(1) for more options
9 export HISTCONTROL=ignoredups
10
11 # check the window size after each command and, if necessary,
12 # update the values of LINES and COLUMNS.
13 shopt -s checkwinsize
14
15 # make less more friendly for non-text input files, see lesspipe(1)
16 [ -x /usr/bin/lesspipe ] && eval "$(lesspipe)"
17
18 # set variable identifying the chroot you work in (used in the prompt below)
19 if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
20 debian_chroot=$(cat /etc/debian_chroot)
21 fi
22
23 # enable color support of ls and also add handy aliases
24 if [ "$TERM" != "dumb" ]; then
25 eval `dircolors -b`
26 alias ls='ls --color=auto'
27 alias dir='ls --color=auto --format=vertical'
28 alias vdir='ls --color=auto --format=long'
29 fi
30
31 # Load prompt
32 if [ -f ~/.bash_prompt ] ; then
33 . ~/.bash_prompt
34 fi
35
36 # Load aliases
37 if [ -f ~/.bash_aliases ] ; then
38 . ~/.bash_aliases
39 fi
40
41 # Handy little calculator
42 function calc () {
43 awk "BEGIN { print $* ; }"
44 }
45
46 # If this is an xterm set the title to user@host:dir
47 case $TERM in
48 xterm*)
49 PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
50 ;;
51 *)
52 ;;
53 esac
54
55 # enable programmable completion features (you don't need to enable
56 # this, if it's already enabled in /etc/bash.bashrc).
57 if [ -f /etc/bash_completion ]; then
58 . /etc/bash_completion
59 fi
60
New Paste
Go to most recent paste.