BTS

Issue2267

Title zshrc prompt styling documentation unclear - sad-smiley hard to disable
Priority bug Status in-progress
Superseder Nosy List cmcaine, ft
Assigned To ft Topics zsh

Created on 2016-10-13.22:21:25 by cmcaine, last changed 2016-10-15.02:31:01 by cmcaine.

Files
File name Uploaded Type Edit Remove
unnamed cmcaine, 2016-10-15.02:31:01 text/html
Messages
msg5944 (view) Author: cmcaine Date: 2016-10-15.02:31:01
> No, that's not quite right. You only need the second. And to be precise,
> that's a list style, so setting it to the empty list would be correct.
> Thus:
>
>   zstyle ':prompt:grml:right:setup' items

That, and my setting items to '' both seem to work now and I can't
reproduce the problem I thought I was having there with needing to set both
styles. I must have got confused when I was testing last time.

Thanks for correcting me about lists and sorry for the dodgy bug report - I
should have tested more thoroughly :)

> However, I can see how use-rprompt may have confused you. Its name is
> probably a better description of what it does, than is the documentation
> in the prompts help text: If it is on (which is the default), then the
> prompt code is allowed to use the rprompt variables. If it is off, it
> is not. And it will not. It won't unset the prompt either. It leaves
> control over these parameter to the user. So a second way to get rid
> of the sad smiley would be this:
>
>   zstyle ':prompt:grml:right:setup' use-rprompt false
>   RPS1=''
>
> Documentation could be better. I will see if I can take a look at it
> during the day.

Thanks for the clarification.
msg5943 (view) Author: ft Date: 2016-10-15.02:04:22
Hi,

> To disable the sad smiley that appears when a command fails with the default
> zshrc, you need to run these two commands:
>
> zstyle ':prompt:grml:right:setup' use-rprompt false
> zstyle ':prompt:grml:right:setup' items ''

No, that's not quite right. You only need the second. And to be precise,
that's a list style, so setting it to the empty list would be correct.
Thus:

  zstyle ':prompt:grml:right:setup' items

However, I can see how use-rprompt may have confused you. Its name is
probably a better description of what it does, than is the documentation
in the prompts help text: If it is on (which is the default), then the
prompt code is allowed to use the rprompt variables. If it is off, it
is not. And it will not. It won't unset the prompt either. It leaves
control over these parameter to the user. So a second way to get rid
of the sad smiley would be this:

  zstyle ':prompt:grml:right:setup' use-rprompt false
  RPS1=''

Documentation could be better. I will see if I can take a look at it
during the day.
msg5940 (view) Author: cmcaine Date: 2016-10-13.22:21:24
To disable the sad smiley that appears when a command fails with the default
zshrc, you need to run these two commands:

zstyle ':prompt:grml:right:setup' use-rprompt false
zstyle ':prompt:grml:right:setup' items ''

From the documentation (prompt -h grml) one would think that either would be
sufficient.

In general, the use-rpompt style is unclear.

Suggestions:

1) use-rprompt is removed

2) `zstyle ':prompt:grml:right:setup' items ''` is made sufficient to remove the
sad-smiley

3) The documentation is extended to include an example of how to add and remove
items from the prompt.
History
Date User Action Args
2016-10-15 02:31:01cmcainesetfiles: + unnamed
nosy: ft, cmcaine
messages: + msg5944
2016-10-15 02:04:22ftsetstatus: unread -> in-progress
nosy: + ft
messages: + msg5943
assignedto: ft
2016-10-13 22:21:25cmcainecreate