diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-10-12 19:12:40 -0400 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-10-12 19:12:40 -0400 |
commit | 8ff950d098146bc929504b062bcc6ccd5a2cb6ed (patch) | |
tree | e5d73cf1997b28bbaa24a693f5d8c2abb45be313 /.config/bash | |
parent | 9d689e7d224b5c1ea3ab3018998135979f19c5a9 (diff) | |
parent | b0cdbb3da2c2b36d3c65b00db4eaf5a0d29c2cd6 (diff) |
Merge remote-tracking branch 'origin/master' into build64-par
Conflicts:
.config/bash/rc.sh
.config/login.sh
.config/ssh/config
.config/wmii/include.sh
Diffstat (limited to '.config/bash')
-rw-r--r-- | .config/bash/aliases.sh | 31 | ||||
-rw-r--r-- | .config/bash/rc.sh | 16 |
2 files changed, 20 insertions, 27 deletions
diff --git a/.config/bash/aliases.sh b/.config/bash/aliases.sh index 0964a83..aabd073 100644 --- a/.config/bash/aliases.sh +++ b/.config/bash/aliases.sh @@ -6,23 +6,23 @@ # Set up colors and settings for ls/dir/vdir # ###################################################################### if [ -x "`which dircolors`" ]; then - eval "`dircolors -b`" - alias ls='ls -1v --color=auto' - alias dir='dir -v --color=auto' - alias vdir='vdir -v--color=auto' + eval "`dircolors -b`" + alias ls='ls -1v --color=auto' + alias dir='dir -v --color=auto' + alias vdir='vdir -v--color=auto' - for xgrep in ${PATH//:/\/*grep }/*grep; do - if [ -f "$xgrep" ]; then - xgrep=`basename "$xgrep"` - if [ "$xgrep" != pgrep ]; then - alias $xgrep="$xgrep --color=auto" - fi - fi - done + for xgrep in ${PATH//:/\/*grep }/*grep; do + if [ -f "$xgrep" ]; then + xgrep=`basename "$xgrep"` + if [ "$xgrep" != pgrep ]; then + alias $xgrep="$xgrep --color=auto" + fi + fi + done else - alias ls='ls -1v' - alias dir='dir -v' - alias vdir='vdir -v' + alias ls='ls -1v' + alias dir='dir -v' + alias vdir='vdir -v' fi ###################################################################### @@ -36,7 +36,6 @@ alias l='ls -CF' # Some preferences for miscellaneous stuff # ###################################################################### #alias rm='gvfs-trash' -alias ssh='ssh -XC' #alias sed='sed --follow-symlinks' # breaks sed 4.2.2 alias tree='tree --charset utf8' alias cd=pushd diff --git a/.config/bash/rc.sh b/.config/bash/rc.sh index 90e5b2d..447796a 100644 --- a/.config/bash/rc.sh +++ b/.config/bash/rc.sh @@ -1,15 +1,10 @@ -# ~/.bashrc: executed by bash(1) for non-login shells. +# ~/.bashrc: executed by bash(1) for interactive non-login shells. # I include this file for all interactive invocations of bash(1), whether # they are login shells or not. # If not running interactively, don't do anything [[ $- != *i* ]] && return -# 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 - # Why is this not on by default? # "We have a cached value, but it isn't valid anymore. Should we trash it?" # "Duh, yes!" @@ -45,11 +40,10 @@ term-title() { } make_prompt() { - local _CHROOT='${debian_chroot:+($debian_chroot)}' - echo "${BOLD}${_CHROOT}${GREEN}\u@\h${RESET}${BOLD}${BLUE}:\w${RESET}" + echo "${BOLD}${GREEN}\u@\h${BLUE}:\w${RESET}" } -if [[ -x /usr/bin/tput ]] && tput setaf 1 >&/dev/null; then +if tput setaf 1 &>/dev/null; then # We have color support; assume it's compliant with Ecma-48 # (ISO/IEC-6429). (Lack of such support is extremely rare, and such # a case would tend to support setf rather than setaf.) @@ -60,13 +54,13 @@ if [[ -x /usr/bin/tput ]] && tput setaf 1 >&/dev/null; then BLUE="$(tput setaf 4)" _STATUS="${BOLD}[" - _STATUS+="\$(v=\$?; if [[ \$v = 0 ]]; then c='${GREEN}'; else c='${RED}'; fi; printf %s%03i \$c \$v)" + _STATUS+="\$(v=\$?; [[ \$v = 0 ]] && c='${GREEN}' || c='${RED}'; printf %s%03i \$c \$v)" _STATUS+="${RESET}${BOLD}]${RESET}" else _STATUS='[$?]' fi PS1="${_STATUS} $(make_prompt)"'\n\$ ' -unset RESET BOLD RED GREEN BLUE _STATUS use_color +unset RESET BOLD RED GREEN BLUE _STATUS PS1="$(term-title $(make_prompt))$PS1" unset make_prompt |