Re: displaying path


Subject: Re: displaying path
From: Jim Cole (greyleaf@yggdrasill.net)
Date: Fri Apr 21 2000 - 19:15:13 MDT


For bash, the PS1 environment variable is used. If you do a man bash and
search for PROMPTING you should find all the options. I believe \W is the
one that gets you the trailing component of the path.

For tcsh, you use the "prompt" shell variable. A %c gets you the trailing
component. All of the options can be found with man tcsh, though you might
want to search on %c rather than prompt, or you will probably be searching
for a while ;)

Jim

Sean R. Bittinger's bits of Fri, 21 Apr 2000 translated to:

>This is a very simple question, I almost feel silly just asking it, but how
>else will it be known otherwise, I guess. OK, how do certain shells display
>the last part of your current directory before the command prompt sign?
>I've seen it in varying Linux and Unix distros, and it always changes as to
>which shells have it. If I want to make it display in a shell that isn't
>doing it currently, how do I do it? I've seen where tcsh will have it but
>not bash, or where bash will have it but not tcsh (never do both shells have
>it which is just annoying). Just wondering how I would make a shell display
>the directory I am in, because I find it much more easy and productive.
>
>Thanks,
>-Rogan
>
>



This archive was generated by hypermail 2a24 : Sun Apr 23 2000 - 22:14:40 MDT