Re: SIGINT in a sourced script does not clean up some special variables

2015-11-10 Thread Chet Ramey
On 11/10/15 3:36 AM, Grisha Levit wrote: > Apologies if I'm missing something about the expected SIGINT behavior. I've > read through the previous SIGINT discussions but this still seems unexpected: Thanks for the report. I'll take a look. -- ``The lyf so short, the craft so long to lerne.''

Re: Bug in bash 4.4-beta: suspending and restarting "man" program

2015-11-10 Thread Chet Ramey
On 11/9/15 5:55 PM, Keith Thompson wrote: > I have some more information on this. In the latest test, > the problem occurs when I run bash under rxvt, but not when I run it under > xterm. > > Using strace, I've found a difference in a call to rt_sigaction(). It calls > > rt_sigaction(SIGTSTP,

Re: BASH_ARG{C,V} set when sourcing, even without extdebug

2015-11-10 Thread Chet Ramey
On 11/10/15 1:59 AM, Grisha Levit wrote: > It looks like the source builtin pushes its own argc and argv onto the arrays > but only if it is called with no other arguments. Yes, bash has always done this as a convenience. This is a way to get the name of the sourced file in the common case.

Re: Bug in bash 4.4-beta: suspending and restarting "man" program

2015-11-10 Thread Keith Thompson
But there's still a mystery here. Why does it behave differently under rxvt vs. xterm, and why does that difference show up in bash 4.4-beta but not in 4.3.30? (Both versions of bash are built from source on the same system.) Running bash 4.3.30 under either xterm 261 or rxvt v2.6.4, I get:

Re: Proposed Prompt Escapes

2015-11-10 Thread Dennis Williamson
On Tue, Nov 10, 2015 at 12:14 PM, Andreas Schwab wrote: > Dennis Williamson writes: > > > But wait, you don't need the intermediate step! It already works!!! > > > > prompt=$'\u, something about dominoes \U1F061 \@ ' > > You should quote the

Re: Proposed Prompt Escapes

2015-11-10 Thread Dennis Williamson
On Mon, Nov 9, 2015 at 5:09 PM, Dennis Williamson < dennistwilliam...@gmail.com> wrote: > > > On Thu, Nov 5, 2015 at 6:26 PM, Dennis Williamson < > dennistwilliam...@gmail.com> wrote: > >> It might be handy to have some of the escapes that work in $'string' >> quoting to also work in prompts

Re: Proposed Prompt Escapes

2015-11-10 Thread Andreas Schwab
Dennis Williamson writes: > But wait, you don't need the intermediate step! It already works!!! > > prompt=$'\u, something about dominoes \U1F061 \@ ' You should quote the backslashes. prompt=$'\\u, something about dominoes \U1F061 \\@ ' Andreas. -- Andreas

Re: Bug in bash 4.4-beta: suspending and restarting "man" program

2015-11-10 Thread Keith Thompson
On Tue, Nov 10, 2015 at 11:35 AM, Chet Ramey wrote: > > > It seems like you need to figure out why rxvt starts the shell with > SIGTSTP ignored. It doesn't seem like anything that the system /bin/sh > or the bash version you're running does, since xterm doesn't exhibit >

Re: Bug in bash 4.4-beta: suspending and restarting "man" program

2015-11-10 Thread Chet Ramey
On 11/10/15 2:15 PM, Keith Thompson wrote: > But there's still a mystery here. Why does it behave differently under rxvt > vs. xterm, > and why does that difference show up in bash 4.4-beta but not in 4.3.30? > (Both versions of bash are built from source on the same system.) > > Running bash

Re: Bug in bash 4.4-beta: suspending and restarting "man" program

2015-11-10 Thread Chet Ramey
On 11/10/15 3:17 PM, Keith Thompson wrote: > On Tue, Nov 10, 2015 at 11:35 AM, Chet Ramey > wrote: > > > > It seems like you need to figure out why rxvt starts the shell with > SIGTSTP ignored. It doesn't seem like anything that the

Re: Bug in bash 4.4-beta: suspending and restarting "man" program

2015-11-10 Thread Andreas Schwab
Chet Ramey writes: > I can make bash blow away the original signal dispositions and pretend they > were SIG_DFL when an interactive shell starts, if there is no alternative. Given that login(1) has the same behaviour there is probably no alternative. Andreas. -- Andreas

SIGINT in a sourced script does not clean up some special variables

2015-11-10 Thread Grisha Levit
Apologies if I'm missing something about the expected SIGINT behavior. I've read through the previous SIGINT discussions but this still seems unexpected: $ declare -p BASH_ARGC BASH_ARGV BASH_SOURCE BASH_LINENO declare -a BASH_ARGC=() declare -a BASH_ARGV=() declare -a BASH_SOURCE=() declare -a

Re: Bug in bash 4.4-beta: suspending and restarting "man" program

2015-11-10 Thread Keith Thompson
On Tue, Nov 10, 2015 at 1:57 PM, Andreas Schwab wrote: > Chet Ramey writes: > > > I can make bash blow away the original signal dispositions and pretend > they > > were SIG_DFL when an interactive shell starts, if there is no > alternative. > > Given

Re: ${var@P} expansion includes 0x01 and 0x02

2015-11-10 Thread Chet Ramey
On 11/9/15 7:53 PM, Dennis Williamson wrote: > > With editing off, I find that I must delimit variables with braces. Without > the braces, only the second escape sequence is output. The \] isn't > terminating the variable name when editing is off. When line editing isn't enabled, the \[ and \]

Re: Bug in bash 4.4-beta: suspending and restarting "man" program

2015-11-10 Thread Keith Thompson
On Tue, Nov 10, 2015 at 2:42 PM, Keith Thompson wrote: > On Tue, Nov 10, 2015 at 1:57 PM, Andreas Schwab > wrote: > >> Chet Ramey writes: >> >> > I can make bash blow away the original signal dispositions and pretend >> they