|
How do I change my PS1 command prompt in Bash?I have read about 15 chapters of your book (Teach Yourself UNIX in 24 Hours) so far. We are using vi. On the PS1 command, how do I see what is in it so I can add to it and not change what is already there? We are using bash. What I see now is: ctdaywbsdv:/u/gwilki$ When I enter ‘echo $PS1’ I get: $ \[\e[0m\] How do I keep the above and add the histcmd option? What does the \e and 0m\ mean? What do the [] the square brackets mean? I can’t find a man page for PS1. How do I find the rest of the options for this PS1? You're right that there's no man page for the PS1 prompt setting in Bash, but the bash man page itself (type man bash) is incredibly long, and one section explains all the features and capabilities of the PS1 prompt variable. In that it notes, for example, that: The value of this parameter is expanded (see PROMPTING below) and used as the primary prompt string. The default value is \s-\v\$ Going down to the section labeled PROMPTING, it explains all the different variables you can utilize to set or customize your own Bash prompt. It's incredibly long:
To see the current value of your prompt, just type echo $PS1 in the Bash shell. To change it, simply change the value of that variable. To make the change automatic each time you log in, add that to your ~/.profile and it's done. Now you have enough information to learn what the \e and \0m mean too. The former is the ASCII escape character and is likely being used to start a sequence to put your prompt in bold or inverse video, and \0m is indeed the sequence required to do just that, it's the \000 format being used. I hope that helps you fine-tune your Bash prompt as needed!
Categorized:
Unix and Linux Help
(Article 7458,
Written by Dave Taylor)
Tagged: bash, command shells, linux, unix Previous: How do I change my return address in Google Gmail? Next: Should I buy links from sites with higher PageRank? Subscribe!
can you get a cds music on the psp Posted by: hvjadsf dfg at July 23, 2007 7:28 PMI have something to say, now that you mention it, but ...
I do have a comment, now that you mention it!
|
Recommended
Recent Entries
Search
I Need Help!
Apple iPad Help
Articles and Reviews Auctions and Online Shopping Blogs and RSS Feeds Building Web Site Traffic Business and Management CGI Scripts and Web Site Programming Computer and Internet Basics d) None of the Above Facebook Help Google Plus Help HTML and CSS Industry News and Trade Shows iPhone and Cell Phone Help iPod, Sony PSP and MP3 Player Help Mac OS X Help Pay Per Click (PPC) Advertising Search Engine Optimization (SEO) Shell Script Programming Tech Support Video Help The Writing Business Twitter, LinkedIn and Social Network Help Unix and Linux Help Video Game Tips and Help Windows PC Help WordPress Help |