Date: Thu, 2 Jul 2020 14:57:15 -0400 From: Aryeh Friedman <aryeh.friedman@gmail.com> To: Polytropon <freebsd@edvax.de> Cc: Brandon helsley <brandon.helsley@hotmail.com>, Per Hedeland <per@hedeland.org>, freebsd-questions <freebsd-questions@freebsd.org> Subject: Re: Shell Message-ID: <CAGBxaXnz7ju%2BQyHRHweVuepgvrfz7xAvOXUrszcEb9YfnTgMdQ@mail.gmail.com> In-Reply-To: <20200702200915.0ef85318.freebsd@edvax.de> References: <CY4PR19MB010400AC4940C67421BFADE8F96E0@CY4PR19MB0104.namprd19.prod.outlook.com> <DB8PR06MB6442289C119C69BDF4303E72F66F0@DB8PR06MB6442.eurprd06.prod.outlook.com> <20200630104317.812dce86b2dc5ea5a42a1ee1@sohara.org> <a590654c-ffa2-3171-ce44-ae3f33214b14@hedeland.org> <20200630143913.e27eb3e3.freebsd@edvax.de> <CY4PR19MB0104D3CC0D3BF13B93AB8A1BF96D0@CY4PR19MB0104.namprd19.prod.outlook.com> <20200702200915.0ef85318.freebsd@edvax.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jul 2, 2020 at 2:09 PM Polytropon <freebsd@edvax.de> wrote: > On Thu, 2 Jul 2020 10:53:19 -0600, Brandon helsley wrote: > > Thank you all for the help. I think I was not specific enough > > with my problem. I now know how to change the prompt to what > > I want but still have to issue the command "pwd" to see what > > directory I'm in. For example, when I cd to the /usr/home/ > > directory my prompt is still only root@machine17# instead > > of root@machine17#~/usr/home/ > > Add the following lines to /etc/csh.cshrc: > > set prompt = "%N@%m:%~%# " > The path is often very long and you might want to tell it to only use the last N components of the path for example my prompt is: set prompt='%C1@%M%% ' the %C1 limits it to only the lowest level dir in the path for example I am currently in a subdir of a change set for my main client project so it reads: specMed-3c1.C043@neomarx% the "specMed-3c1.C043" is chage 43 of version 3c1 of the specMed (a name generated by devel/aegis). To learn all the options and %'s expansions see the section of the tcsh man page on the prompt environment variable. There are over 30 of them. -- Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGBxaXnz7ju%2BQyHRHweVuepgvrfz7xAvOXUrszcEb9YfnTgMdQ>
