From 6fc22ca8fa2a51660c62ef102b987881dde86fb4 Mon Sep 17 00:00:00 2001 From: Tony Duckles Date: Fri, 15 Feb 2013 19:33:34 -0600 Subject: [PATCH] .bashrc: Don't check for $STY in settitle() Update settitle() to always echo escape sequence regardless of whether $STY is set. $STY is only set on immediate screen shells; when ssh'd to remote hosts $STY won't be set there. --- .bashrc | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.bashrc b/.bashrc index 3373d6a..144303d 100644 --- a/.bashrc +++ b/.bashrc @@ -120,7 +120,7 @@ HISTSIZE=10000 # PAGER / EDITOR # ---------------------------------------------------------------------- -# See what we have to work with ... +# see what we have to work with ... HAVE_VIM=$(command -v vim) # EDITOR @@ -141,7 +141,7 @@ else fi export PAGER MANPAGER -# Ack +# ack ACK_PAGER="$PAGER" ACK_PAGER_COLOR="$PAGER" @@ -190,9 +190,9 @@ prompt_compact() { } prompt_color() { - # If git and the git bash_completion scripts are installed, use __git_ps1() to show current branch info. - # Never show branch info for $HOME (dotfiles) repo. - # Use the following to exclude a given repo: `git config --local --bool --add bash.hidePrompt true` + # if git and the git bash_completion scripts are installed, use __git_ps1() to show current branch info. + # never show branch info for $HOME (dotfiles) repo. + # use the following to exclude a given repo: `git config --local --bool --add bash.hidePrompt true` if [ -n "$(type -P git)" -a "$(type -t __git_ps1)" = "function" ]; then PS_GIT='$(test -n "$(__git_ps1 %s)" && test "$(git rev-parse --show-toplevel)" != "$HOME" && @@ -244,19 +244,19 @@ alias du1='du -h --max-depth=1' alias fn='find . -name' alias hi='history | tail -20' -# For Solaris, use GNU versions of core utils +# for Solaris, use GNU versions of core utils if [ "$UNAME" = SunOS ]; then test -x /usr/gnu/bin/grep && alias grep="/usr/gnu/bin/grep" test -x /usr/gnu/bin/sed && alias sed="/usr/gnu/bin/sed" test -x /usr/gnu/bin/awk && alias awk="/usr/gnu/bin/awk" fi -# Alias csh-style "rebash" to bash equivalent +# alias csh-style "rebash" to bash equivalent alias rehash="hash -r" # set 'screen' window title settitle() { - test -n "$STY" && printf "\033k%s\033\\" "$@" + printf "\033k%s\033\\" "$@" } # ---------------------------------------------------------------------- @@ -322,7 +322,7 @@ alias lla="ls -la" if [ -n "$COLORS" ]; then case "$UNAME" in "SunOS") - # For Solaris, use the GNU version of grep for color support + # for Solaris, use the GNU version of grep for color support test -x /usr/gnu/bin/grep && alias grep="/usr/gnu/bin/grep --color=always" ;; *) @@ -413,7 +413,7 @@ test -r ~/.shenv && PATH=$(puniq "$PATH") MANPATH=$(puniq "$MANPATH") -# Use the color prompt by default when interactive +# use the color prompt by default when interactive test -n "$PS1" && prompt_color @@ -422,8 +422,8 @@ test -n "$PS1" && # ------------------------------------------------------------------- test -n "$INTERACTIVE" -a -n "$LOGIN" && { - # Get current uname and uptime (if exists on this host) - # Strip any leading whitespace from uname and uptime commands + # get current uname and uptime (if exists on this host) + # strip any leading whitespace from uname and uptime commands t_uname="$(test -n "`type -P uname`" && uname -npsr | sed -e 's/^\s+//')" t_uptime="$(test -n "`type -P uptime`" && uptime | sed -e 's/^\s+//')" if [ -n "$t_uname" ] || [ -n "$t_uptime" ]; then -- 2.45.2