Re: Multiline editing breaks if the previous output doesn't end in newline

2022-10-29 Thread Martin D Kealey
This sounds like a bug in whatever is producing the output. POSIX text files have a newline terminating every line; that description includes streams going through pipes and tty devices if they purport to be text. It's fairly simple to fix this by adding this to the end of your .bashrc (or the sys

Re: Subsequent Here Doc/String Never Evaluated in Process Substitution

2022-10-29 Thread Martin D Kealey
On Fri, 28 Oct 2022 at 20:37, wrote: > Thank you for the awesome shell. I noticed the following after upgrading > from 5.1.16-3 to 5.2.2-2 on Fedora. It actually resulted in a minor > amount > of data loss. After fixing the attached file to remove the carriage returns, I was able to reproduce

Remove unnecessary checks before calls of the function “free”

2022-10-29 Thread Markus Elfring
Hello, The function “free” is documented in the way that no action shall occur for a passed null pointer. It is therefore not needed that a function caller repeats a corresponding check. https://stackoverflow.com/questions/18775608/free-a-null-pointer-anyway-or-check-first This issue can be fixed

Re: bash "extglob" needs to upgrade at least like zsh "kshglob"

2022-10-29 Thread Greg Wooledge
On Sat, Oct 29, 2022 at 04:50:00PM +1100, Martin D Kealey wrote: > This seems like a good reason to simply translate extglobs into regexes, > which should run in linear time, rather than put effort into building and > debugging a parallel implementation. This isn't straightforward, because of the

Re: Multiline editing breaks if the previous output doesn't end in newline

2022-10-29 Thread Koichi Murase
> $ printf '%*s\rY' "$COLUMNS" X > | ... X| > |Y | P.S. Here I used `|' to represent the left and right boundaries of the terminal display area.

Re: Multiline editing breaks if the previous output doesn't end in newline

2022-10-29 Thread Koichi Murase
2022年10月29日(土) 15:44 Albert Vaca Cintora : > On Sat, Oct 29, 2022 at 7:28 AM Koichi Murase wrote: > > shopt -s checkwinsize > > { ! type -t tput || tput xenl || tput xn; } &>/dev/null; > > _prompt_xenl_offset=$? > > _prompt_newline() { (:); printf '\e[m%-*s\r\e[K' > > "$((COLUMNS-_prompt_xenl_off