give_terminal_to after re-backgrounded async job

2023-07-07 Thread Grisha Levit
The fix [1] for the issue reported in [2]: + give the terminal to pipeline_pgrp. We don't give the terminal + back to shell_pgrp if an async job exits because we never gave it + to that job in the first place. */ if ((flags & JWAIT_NOTERM) == 0 && running_in_background == 0 && + (job == NO

Re: [PATCH] confusing/obsolete handling of test -t operator (and doc warnings against using -o/-a)

2023-07-07 Thread Chet Ramey
On 7/6/23 2:29 AM, Stephane Chazelas wrote: Hello, Thanks for the report. test -t X Always returns false and doesn't report an error about that invalid number (beside the point here, but in ksh/zsh, that X is treated as an arithmetic expression and evaluates to 0 if $X is not set). Yes, t

[PATCH] normalization tweaks for macOS

2023-07-07 Thread Grisha Levit
A few small tweaks for the macOS-specific normalization handling to handle the issues below: Examples below are using the following setup: $ mkdir -p -- $'\303\251-C' $'e\314\201-D' $ /bin/ls -BF é-C/ é-D/ $ LC_ALL=C /bin/ls -BF e\314\201-D/ \303\251-C/ LC_ALL=C just to make the output clear,

leak in command_word_completion_function

2023-07-07 Thread Grisha Levit
If there a glob is expanded to more than one result while attempting to complete the command word, the matches are discarded but not freed. diff --git a/bashline.c b/bashline.c index 0e5373ab..07f38e62 100644 --- a/bashline.c +++ b/bashline.c @@ -2192,7 +2192,11 @@ globword: local_index = 0;