Package: bash
Version: 3.1dfsg-8
Severity: wishlist
File: /etc/skel/.bashrc
The default /etc/skel/.bashrc contains this:
# If this is an xterm set the title to [EMAIL PROTECTED]:dir
case "$TERM" in
xterm*|rxvt*)
PROMPT_COMMAND='echo -ne "\033]0;[EMAIL PROTECTED]: ${PWD/$HOME/~}\007"'
;;
*)
;;
esac
This need not use PROMPT_COMMAND. In my ~/.bashrc, I changed it to the
following, which works perfectly:
# If this is an xterm or rxvt set the title to [EMAIL PROTECTED]:dir
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;[EMAIL PROTECTED]: \w\a\]$PS1"
;;
*)
;;
esac
This achieves exactly the same effect, but uses the built-in prompt and the
built-in escape sequences. This removes the need to run the internal echo
command, simplifies the logic, makes it easier for users to use PROMPT_COMMAND
for their own purposes, and allows the use of more of the standard prompt
escapes if the user wants them.
This would also address other bug reports on the bash package, such as
#382738.
- Josh Triplett
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.21-rc2test (PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages bash depends on:
ii base-files 4.0 Debian base system miscellaneous f
ii debianutils 2.18 Miscellaneous utilities specific t
ii libc6 2.5-2 GNU C Library: Shared libraries
ii libncurses5 5.5-5 Shared libraries for terminal hand
bash recommends no packages.
-- no debconf information
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]