Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 4414 - redhat style prompt command
Summary: redhat style prompt command
Status: RESOLVED DUPLICATE of bug 4232
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Martin Schlemmer (RETIRED)
URL: http://www.gentoo.org/~mkennedy/redha...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-07-01 22:47 UTC by Matthew Kennedy (RETIRED)
Modified: 2005-07-17 13:06 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Kennedy (RETIRED) gentoo-dev 2002-07-01 22:47:06 UTC
Az,

Seemant suggested (and Naz is interested too) it might be a good idea to make
the settings described in the URL the default for Gentoo, hence this bug. Users
have ocassionally asked how to set prompt_command to do this too (which is why
that page exists in the first place)

Matt
Comment 1 Seemant Kulleen (RETIRED) gentoo-dev 2002-07-01 23:15:43 UTC
in fact, it works if TERM=rxvt as well
I'll check for TERM=Eterm soon

Are there other term types?
Comment 2 Martin Schlemmer (RETIRED) gentoo-dev 2002-07-02 14:45:04 UTC
azarah@nosferatu gentoo-src $ cat rc-scripts/etc/skel/.bashrc 
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/skel/.bashrc,v 1.4 2002/06/30
01:18:55 azarah Exp $

# This file is sourced by all bash shells on startup, whether interactive
# or not.  This file *should generate no output* or it will break the
# scp and rcp commands.

# Change the window title of X terminals 
case $TERM in
	xterm*|rxvt)
		PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"'
		;;
	screen)
		PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\033\\"'
		;;
esac

##uncomment the following to activate bash-completion:
#[ -f /etc/profile.d/bash-completion ] && source /etc/profile.d/bash-completion
azarah@nosferatu gentoo-src $ 


Just tell me what additional XTERM's it works for.


*** This bug has been marked as a duplicate of 4232 ***