Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #15864
| From | Manish Patel <manish.patel2@broadcom.com> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | Re: print/echo lost from COMMAND_PROMPT Function |
| Date | 2020-02-04 16:59 -0500 |
| Message-ID | <mailman.300.1580853571.2412.bug-bash@gnu.org> (permalink) |
| References | <cb99a479-dbf5-462d-191c-bb77aa896fd4@broadcom.com> <258ec5bc-56ef-54c9-fc9b-27dd968574c0@case.edu> <e8b5a34b-6b40-e764-37e6-fb977b03d25b@broadcom.com> |
Thank you Chet, In that case, how do I compile my own bash with specific version of readline? I can not install readline to system but I can compile both in my home directory. Thanks Manish. On 2/4/20 10:07 AM, Chet Ramey wrote: > On 2/3/20 3:26 PM, Manish Patel wrote: > >> Bash Version: 4.4 >> Patch Level: 20 >> Release Status: release >> >> Description: >> Print/echo is lost when generated from a function in >> COMMAND_PROMPT and placed in background in subshell. >> >> I have embedded some git information in my command prompt. >> However, due to large git data, it takes some time to calculate it all. >> So I have placed >> the git processing in the background function, which I call from >> COMMAND_PROMPT. > Readline assumes two things: it starts with the cursor in column 0, and > it is the only thing writing to the screen during redisplay, so it always > knows where the cursor is and can make redisplay decisions accordingly. > Your writing to the screen from a background process violates one or both > of these, so all bets are off. It may be the case that readline decides to > redisplay by moving to column 0, redrawing the prompt, moving the cursor, > and redrawing the changed portions of the line,in which case whatever your > process writes at the beginning of the line gets overwritten. It may be the > case that writing to the screen moves the cursor forward so readline > doesn't move the cursor to the right place or wrap correctly. > > There are no guarantees that anything a background process writes to the > screen will be preserved, or that writing to the screen and moving the > physical cursor will not interfere with readline's redisplay. > > Chet >
Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread
Re: print/echo lost from COMMAND_PROMPT Function Manish Patel <manish.patel2@broadcom.com> - 2020-02-04 16:59 -0500
csiph-web