Come on folks, this is a BUG, not a wishlist item. It destroys a setting a
user has made without asking.

> How it works in Bash is that the PROMPT_COMMAND contains the escape           
>                                

This is complete and utter bullshit. PROMPT_COMMAND does exactly what it
does, namely exactly what the user configured it to do. Changing the title
is not a bash feature in any way, it is completely unrelated to bash.

(And as a matter of fact, most people I know use PS1 for that, and many
use cd to change the title bar because its the only time it changes, buggy
programs excepted).

> sequences to change the Xterm title. However, programs you run do not have    
>                                
> access to this PROMPT_COMMAND environment variable, because it is not         
>                                
> exported.                                                                     
>                                

And even if it were, it has nothing to do with restoring corrupted titles.

> If it was exported, I could at least use that to see if that capability is    
>                                
> being used on the system.

No, you couldn't, especially if it isn't done in PROMPT_COMMAND. This is
complete fantasy.

> Ok, that doesn't grant me the right to overwrite                              
>      

Right, you should restore it like other - well behaving - programs do.

> it, but at least I would be sure the shell would fix it after dstat is        
>                                
> exited. Or I could reset it myself :)

The shell never does it. If anything does, it is the user.

> Now, what I added today to dstat is a check for XTERM_SHELL. If I find my     
>                                
> shell is bash I replace the xterm title.

This completely illogical. You could do it on odd days or when the disk is
full, and it would be about as random.

There is no relationship between "I can corrupt the terminal window title"
and "bash is running". None at all. Adding one will just add another bug
confusing users.

> Not sure if that is a better implementation or if this helps in any way
> for you.

It is one more bug on top of many. Users will be completely confused as
to when their title gets changed, because nobody will ever assume its
depending on the shell, because this feature has nothing to do with any
shells.

> Though I'm still open to look at a way to make this work better without 
> adding another command                                                  

An obvious way to improve it is by acknowledging that it is a bug (first
thing, because it corrupts a user setting without asking) and then
removing it, or making it optional, or restoring the title by first
reading it or using other means of restoring it.

I, for one, am increasingly driven back to vmstat (or at least the stable
release of dstat for the time being) as the bugs in dstat only ever seem
to increase over time, never decrease. This is not a threat :)

Be good, be well,

-- 
                The choice of a
      -----==-     _GNU_
      ----==-- _       generation     Marc Lehmann
      ---==---(_)__  __ ____  __      [EMAIL PROTECTED]
      --==---/ / _ \/ // /\ \/ /      http://schmorp.de/
      -=====/_/_//_/\_,_/ /_/\_\      XX11-RIPE


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to