X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=ian-dotfiles.git;a=blobdiff_plain;f=dot%2Fbashrc;h=5bd98644e8cfb2889b17d7c138f7c8252a26def2;hp=a173c4b6fb8ac8b9a989e4e4d2db02fc153fa410;hb=7b7c62638ff5a2e92c8184cd1487054b6aee13c5;hpb=4ed6df107b1db703ad86565447aa20b6385d3116 diff --git a/dot/bashrc b/dot/bashrc index a173c4b..5bd9864 100644 --- a/dot/bashrc +++ b/dot/bashrc @@ -11,11 +11,13 @@ export PWD # My own functions ls() { /bin/ls -FC "$@"; } ll() { /bin/ls -FCla "$@"; } -setprompt() { - if [ "x$SCHROOT_SESSION_ID" = x ]; then - PS1=`autotitle`; export PS1; - fi - } + +if autotitle >/dev/null 2>&1 && [ "x$SCHROOT_SESSION_ID" = x ]; then + setprompt() { PS1=`autotitle`; export PS1; } +else + setprompt() { :; } +fi + rs() { eval `/usr/openwin/bin/resize` ; setprompt ; } cd() { builtin cd "$@"; setprompt; } pu() { builtin pushd "$@"; setprompt; } @@ -25,7 +27,7 @@ po() { builtin popd "$@"; setprompt; } if [ "$PS1" ] then HISTFILE=$HOME/.history/$HOST~$$~ - AUTOTITLE_STDOUT="%?u%U%!%?g(%G)%!%?u@%!%h:%d1~.> " + AUTOTITLE_STDOUT="%Edebian_chroot.%?u%U%!%?g(%G)%!%?u@%!%h:%d1~.> " AUTOTITLE_WINDOW="%h - %d~. %Y.[U..[M..[D./..%X.L]..M]..R]./.. %U%?G(%G)%!" AUTOTITLE_ICON="%h: %d3~. %Y.[U..[M..[D./..%X.L]..M]..R]./.." export AUTOTITLE_STDOUT AUTOTITLE_WINDOW AUTOTITLE_ICON