.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   The Agora (http://forums.bots-united.com/forumdisplay.php?f=38)
-   -   bash prompt (http://forums.bots-united.com/showthread.php?t=2961)

Cpl. Shrike 11-11-2004 00:11

bash prompt
 
How do i (or can i) change the shell prompt to display only the last directory im in and not the whole path on he BU server? ???:(

BAStumm 11-11-2004 01:21

Re: bash prompt
 
.bashrc file in your user directory or globally in /etc/bashrc

it would look about like this:

Code:

  [ "$PS1" = "\\s-\\v\\\$ " ] && PS1="[\u@\h \W]\\$ "
that would give you:

[user@host cwd]#

cwd = current working directory ie if your in /var/www/html it would show just html

Pierre-Marie Baty 11-11-2004 03:44

Re: bash prompt
 
generally speaking, type:
set | grep PS1
that will give you the variable that determines the shape of your login prompt. If you know Doskey (ah, the good ole times ;)) that should sound familiar. Anyway, play around and ask mr. google, you'll soon for sure find out what you need to change. Then just put it in your .bashrc in your home dir like BAStumm says.

Cpl. Shrike 12-11-2004 20:11

Re: bash prompt
 
Thanks guys.

Copy paste from BAStumm's post worked just fine :D

[NvT]_KaszpiR_ 03-12-2004 16:59

Re: bash prompt
 
http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/


All times are GMT +2. The time now is 08:51.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.