? <[EMAIL PROTECTED]> said: > Hi. I was trying to find some files installed in fink, and went pretty > deep in some subdirectory. It was annoying that the shell prompt > showed the full path name which was so long that it was taking two > lines! How do I customize the shell so that it only shows the current > directory's local name? like > [computer-name:directory $], instead of > [computer-name:~/whatever1/whatever2/whatever3/whatever4/......... $]?
The prompt string is a shell (environment) variable. But the variable name and the various tokens you can use in it depend on what shell you're using. All shells have manpages that give the necessary info. For bash, the primary prompt is $PS1, defaulting to "\h:\w \u\$ ". The bash manpage has a section entitled PROMPTING, which notes that \W is the basename portion of the \w full path, so export PS1="\h:\W \u\$ " would convert the prompt to just displaying the last component of the current directory. dan -- Daniel Macks [EMAIL PROTECTED] http://www.netspace.org/~dmacks ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ Fink-beginners mailing list Fink-beginners@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fink-beginners