Bug 89295 - Default tcsh prompts look non Gentoo-ish
|
Bug#:
89295
|
Product: Gentoo Linux
|
Version: unspecified
|
Platform: All
|
|
OS/Version: Linux
|
Status: RESOLVED
|
Severity: enhancement
|
Priority: P2
|
|
Resolution: FIXED
|
Assigned To: grobian@gentoo.org
|
Reported By: grobian@gentoo.org
|
|
Component: Ebuilds
|
|
|
URL:
|
|
Summary: Default tcsh prompts look non Gentoo-ish
|
|
Keywords:
|
|
Status Whiteboard:
|
|
Opened: 2005-04-16 02:06 0000
|
The default prompts provided by tcsh look very non Gentoo-ish in comparison
with the bash equivalents.
Reproducible: Always
Steps to Reproduce:
1. emerge tcsh
2. start tcsh for a user with no .tcshrc
3. watch the prompt
Actual Results:
got a dull prompt
Expected Results:
present a Gentoo-ish prompt, like the bash default prompt
I propose bash inspired prompts for tcsh users and root.
user:
set prompt =
"%{\033]0;%m:%~\007%}%{\033[0;1;34m%}(%{\033[0;1;32m%}%m%{\033[0m%}:%{\033[0;1;34m%}%c3%{\033[0;1;34m%})
%{\033[0;1;32m%}%n%{\033[0;1;32m%}%%%{\033[0m%} "
root:
set prompt = "%{\033]0;%#
%m:%~\007%}%{\033[0;1;34m%}(%{\033[0;1;31m%}%m%{\033[0m%}:%{\033[0;1;34m%}%c3%{\033[0;1;34m%})
%{\033[0;1;31m%}%#%{\033[0m%} "
please include a patch to achieve your desired results.
Just reopen this bug when you've attached the patch.
Created an attachment (id=56906) [details]
This patch changes the default tcsh prompts
This patch changes the default tcsh prompts:
- it sets a special prompt for the root user
- it sets a prompt for normal users
- it sets the window title accordingly when this is supported
The colours and style of the prompts are much bash alike but with a tcsh
flavour.
I'm sorry for the hassle.
I attached a patch for the /etc/profile.d/tcsh-settings file where the prompt is set.
Created an attachment (id=56928) [details]
TCSH prompt patch v2
Oops, if we don't know what kind of terminal emulation we deal with, also don't
use colours.
This is a better version of the patch and makes the previous one obsolete.
Created an attachment (id=56991) [details]
patch which does not fail on a clean install (v3)
Sorry, I didn't realise that 100 people have 100 different environments.
This time the patch should succesfully work on a default clean installation.
Created an attachment (id=58352) [details]
Patch which sets X window title only if applicable
This patch always sets the coloured prompt, but only sets the X window title if
appropriate, like in Bash the title is set using PROMPT_COMMAND in
/etc/skel/.bashrc. Not using precmd here, because that doesn't allow us to
have a path with the homedir substituted by `~'.