PS1 in 6.3

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

PS1 in 6.3

Marko Cupać
Hi,

before I get to the question, I'd like to thank all the people who made
6.3 happen. Keep up the good work! :)

I noticed that on 6.3 prompt shows hostname($|#) by default. Up until
now I was setting it by exporting PS1 in .profile:

PS1="\u@\h:\w \\$ "
export PS1

Where is the default setting for prompt? Is it still ok to change it
in .profile (I like also to have pwd in prompt).

Pardon my ignorance, and thank you in advance,

--
Before enlightenment - chop wood, draw water.
After  enlightenment - chop wood, draw water.

Marko Cupać
https://www.mimar.rs/

Reply | Threaded
Open this post in threaded view
|

Re: PS1 in 6.3

Wayne Oliver
On 03/04/2018 17:11, Marko Cupać wrote:

> Hi,
>
> before I get to the question, I'd like to thank all the people who made
> 6.3 happen. Keep up the good work! :)
>
> I noticed that on 6.3 prompt shows hostname($|#) by default. Up until
> now I was setting it by exporting PS1 in .profile:
>
> PS1="\u@\h:\w \\$ "
> export PS1
>
> Where is the default setting for prompt? Is it still ok to change it
> in .profile (I like also to have pwd in prompt).
>
> Pardon my ignorance, and thank you in advance,
>

Definitely

wayne@puffy on ttyp1
[/home/wayne] export PS1="\u@\h:\w \\$ "
wayne@puffy:~ $ uname -a
OpenBSD puffy.insta.co.za 6.3 GENERIC#100 amd64

Reply | Threaded
Open this post in threaded view
|

Re: PS1 in 6.3

sarlok
In reply to this post by Marko Cupać
On 03.04.2018 07:11, Marko Cupać wrote:

> Hi,
>
> before I get to the question, I'd like to thank all the people who
> made
> 6.3 happen. Keep up the good work! :)
>
> I noticed that on 6.3 prompt shows hostname($|#) by default. Up until
> now I was setting it by exporting PS1 in .profile:
>
> PS1="\u@\h:\w \\$ "
> export PS1
>
> Where is the default setting for prompt? Is it still ok to change it
> in .profile (I like also to have pwd in prompt).
>
> Pardon my ignorance, and thank you in advance,

Check /etc/profile

Reply | Threaded
Open this post in threaded view
|

Re: PS1 in 6.3

Andreas Kusalananda Kähäri
In reply to this post by Marko Cupać
On Tue, Apr 03, 2018 at 05:11:49PM +0200, Marko Cupać wrote:

> Hi,
>
> before I get to the question, I'd like to thank all the people who made
> 6.3 happen. Keep up the good work! :)
>
> I noticed that on 6.3 prompt shows hostname($|#) by default. Up until
> now I was setting it by exporting PS1 in .profile:
>
> PS1="\u@\h:\w \\$ "
> export PS1
>
> Where is the default setting for prompt? Is it still ok to change it
> in .profile (I like also to have pwd in prompt).
>
> Pardon my ignorance, and thank you in advance,
>
> --
> Before enlightenment - chop wood, draw water.
> After  enlightenment - chop wood, draw water.
>
> Marko Cupać
> https://www.mimar.rs/
>

This was discussed in December 2017 on openbsd-tech:

        https://marc.info/?t=151284150900003&r=1&w=2

You are free to set PS1 to whatever value you want or need.  Note that
PS1 does not need to be exported if it's set in the file pointed to by
$ENV.

Cheers,

--
Andreas Kusalananda Kähäri,
National Bioinformatics Infrastructure Sweden (NBIS),
Uppsala University, Sweden.