[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] shell options in prompt
From: |
Greg Wooledge |
Subject: |
Re: [PATCH] shell options in prompt |
Date: |
Fri, 14 Nov 2014 12:04:20 -0500 |
User-agent: |
Mutt/1.4.2.3i |
On Fri, Nov 14, 2014 at 06:01:37PM +0100, Piotr Grzybowski wrote:
> I would like to propose a patch, that allows to use \o in prompt:
>
> $ PS1="(\o)\u@\h \w $ "
> (himBH)merlin@xxxx ~/bash $ set +hm
> (iBH)merlin@xxxx ~/bash $
>
> \o gets replaced by all options that are on and visible via set -o.
PS1='($-)\u@\h \w \$ '