LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 08-01-2004, 03:40 AM   #1
techrolla
Member
 
Registered: Nov 2003
Distribution: Gentoo, Debian
Posts: 188

Rep: Reputation: 30
getting custom PWD in bash prompt


Hello...well I was messing around with /etc/profile, putting in colors for the logins and whatnot, but I was curious as to how I could get the default custom PWD in the bash prompt? If I use ${PWD} it will just put in the /home/max but if I use "\w" it will do ~ and then keep going from there if I plan on going deeper in my home directory. I can't seem to keep the standard bash way of just saying the current directory, without the full path (like [me@nuttylove max]...Is there possibly another command that just prints this that I could put into PS1? Thanks!
 
Old 08-01-2004, 08:46 AM   #2
mikshaw
LQ Addict
 
Registered: Dec 2003
Location: Maine, USA
Distribution: Slackware/SuSE/DSL
Posts: 1,320

Rep: Reputation: 45
\w the current working directory
\W the basename of the current working directory
 
Old 08-09-2004, 12:39 AM   #3
techrolla
Member
 
Registered: Nov 2003
Distribution: Gentoo, Debian
Posts: 188

Original Poster
Rep: Reputation: 30
Hey, thanks alot man! just what I needed
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
bash prompt subG Slackware 6 01-18-2006 04:43 PM
reset pwd to root's current pwd? ataraktos2 Linux - General 10 04-26-2005 04:13 AM
help with bash prompt everythingand2 Linux - Newbie 7 12-06-2003 04:28 PM
can't make custom prompt work for root!? jaregi Linux - General 4 09-09-2003 11:40 PM
Custom boot prompt. drewskiamk Linux - General 1 06-22-2003 01:42 PM


All times are GMT -5. The time now is 04:27 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration