Re: Buffer corruption when the terminal is resized.

2017-06-11 Thread Eduardo Bustamante
On Sun, Jun 11, 2017 at 12:29:33AM +0200, Paul Peet wrote: [...] > Unfortunately, I am still getting the same behavior as before (This > also happens with xterm for some reason.) Please do consider that Readline has little knowledge about what has been written to the terminal. That's the

Re: Multiline commands do not survive history -w/-r

2017-06-11 Thread Eduardo Bustamante
On Sun, Jun 11, 2017 at 07:00:11PM -0600, gaze...@xmission.com wrote: [...] > Bash Version: 4.3 > Patch Level: 48 > Release Status: release > > Description: > Multiline commands (i.e., a command with embedded newlines) do not > survive > intact when written out to the history file

Re: A background ssh can take over the tty from bash?

2017-06-11 Thread Eduardo Bustamante
On Mon, Jun 12, 2017 at 10:24:38AM +0800, Clark Wang wrote: [...] > I've checked the ssh process and it does not catch SIGTTIN and that's why > I'm confused. Even if that were the case, what makes you think this is a bash bug? Bash is not responsible for misbehaving children. -- Eduardo

Re: A background ssh can take over the tty from bash?

2017-06-11 Thread Clark Wang
On Mon, Jun 12, 2017 at 5:48 AM, Chet Ramey wrote: > On 6/10/17 10:19 AM, Clark Wang wrote: > > > If I kill the "ssh -o ControlMaster=no -o ControlPath=/tmp/socket.tmp > > 127.0.0.1 sleep " then tty #1 (pts/11) would be able to accept my > input > > again. Seems like the

Multiline commands do not survive history -w/-r

2017-06-11 Thread gazelle
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale'

Re: consistency probs var & function re-use

2017-06-11 Thread L A Walsh
Charles Daffern wrote: First problem: If you are assigning a string to a variable, you need to put quotes around the string. That shows that "-p" doesn't insert newlines: > x="$'foo\nbar'" > declare -p x declare -- x="\$'foo\\nbar'" You do not have any newlines in that string, so

Re: consistency probs var & function re-use

2017-06-11 Thread L A Walsh
Chet Ramey wrote: You are misunderstanding what that is supposed to do, or ignoring it. `declare -p' quotes its output in a way that allows it to be reused as shell input. Executing the output of `declare -p' will recreate the variable with an identical value. Re-use as shell input?

Re: consistency probs var & function re-use

2017-06-11 Thread Chet Ramey
On 6/11/17 5:57 PM, L A Walsh wrote: > > > Chris F.A. Johnson wrote: >> On Fri, 9 Jun 2017, L A Walsh wrote: >>> >>> First problem: If you are assigning a string to a variable, >>> you need to put quotes around the string. >> >>You don't need to quote it unless it contains literal

Re: consistency probs var & function re-use

2017-06-11 Thread L A Walsh
Chris F.A. Johnson wrote: On Fri, 9 Jun 2017, L A Walsh wrote: First problem: If you are assigning a string to a variable, you need to put quotes around the string. You don't need to quote it unless it contains literal whitespace. --- Not true if you want to reproduce the

Re: consistency probs w/ 'readonly -f' & 'export -f

2017-06-11 Thread Chet Ramey
On 6/9/17 12:36 PM, L A Walsh wrote: > Greg Wooledge wrote: >> I don't know what you mean. A function is not a name=value pair. > The name is the name of the function, the value is > what the function does. > declare -f hw='() { echo "Hello World\n"; }' No. The world does not need another way

Re: A background ssh can take over the tty from bash?

2017-06-11 Thread Chet Ramey
On 6/10/17 10:19 AM, Clark Wang wrote: > If I kill the "ssh -o ControlMaster=no -o ControlPath=/tmp/socket.tmp > 127.0.0.1 sleep " then tty #1 (pts/11) would be able to accept my input > again. Seems like the background "ssh" at tty #1 is consuming all input. I > cannot understand this since

Re: consistency probs var & function re-use

2017-06-11 Thread L A Walsh
Chris F.A. Johnson wrote: A newline IS literal whitespace. I'm glad you think so. I tend to agree, but I was clarifying for those that might have a different definition.

Re: A background ssh can take over the tty from bash?

2017-06-11 Thread Charles Daffern
>> But, from the man page: >> >> -f Requests ssh to go to background just before command execution. >> This is useful if ssh is going to ask for passwords >> or passphrases, but the user wants it in the background. >> This implies -n. The recommended way to start X11 programs