.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > YappA > The Agora
The Agora This is the place to go if you have suggestions, or if you want to participate in Council discussions. Everyone is welcome!

Reply
 
Thread Tools
bash prompt
Old
  (#1)
Cpl. Shrike
ShrikeBot Coder/Moderator
 
Cpl. Shrike's Avatar
 
Status: Offline
Posts: 550
Join Date: Mar 2004
Location: The Netherlands
Default bash prompt - 11-11-2004

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? ???
  
Reply With Quote
Re: bash prompt
Old
  (#2)
BAStumm
Member
 
BAStumm's Avatar
 
Status: Offline
Posts: 138
Join Date: Jan 2004
Location: Spokane, WA USA
Default Re: bash prompt - 11-11-2004

.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







Last edited by BAStumm; 11-11-2004 at 02:23..
  
Reply With Quote
Re: bash prompt
Old
  (#3)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: bash prompt - 11-11-2004

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.



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: bash prompt
Old
  (#4)
Cpl. Shrike
ShrikeBot Coder/Moderator
 
Cpl. Shrike's Avatar
 
Status: Offline
Posts: 550
Join Date: Mar 2004
Location: The Netherlands
Default Re: bash prompt - 12-11-2004

Thanks guys.

Copy paste from BAStumm's post worked just fine
  
Reply With Quote
Re: bash prompt
Old
  (#5)
[NvT]_KaszpiR_
Member
 
[NvT]_KaszpiR_'s Avatar
 
Status: Offline
Posts: 322
Join Date: Apr 2004
Default Re: bash prompt - 03-12-2004

http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com