[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] shell options in prompt

From: Piotr Grzybowski
Subject: [PATCH] shell options in prompt
Date: Fri, 14 Nov 2014 18:01:37 +0100


 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.
 do you think it can be useful? (I hope this feature is not already
somewhere in the code).
 I attach the patch. If you consider it worth anything I can clean it,
and update the documentation/help messages. Sorry for formatting, I
was desperately trying to be consistent with the coding standard of
surrounding code.


Attachment: 0001-Shell-options-in-prompt.patch
Description: Binary data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]