Re: Why does this kill my box?

2007-11-01 Thread Tomas Janousek
Hello, On Thu, Nov 01, 2007 at 11:25:58AM +, Steve P wrote: > $0 = "test"; expands to "../test.sh = test" and recurses (runs itself with parameters "=" and "test"). > tail -f /var/log/messages > > chmod +x test.sh > ../test.sh -- Tomas Janousek, SW Engineer, Red Hat, Inc.

Wrong input confuses bash's arithmetic unit permanently

2007-11-02 Thread Tomas Janousek
assignments cease to work. Such expressions are for example: let tmp="foo.a"+0 (only in bash 3.2) let x=(0?(3?4):3) I think we should reset noeval to zero in the evalexp function (or restore expr_stack[0], probably). Regards, -- Tomas Janousek, SW Engineer, Red Hat, Inc.

$RANDOM incorrectly seeded in subshells

2007-11-09 Thread Tomas Janousek
ince subshell_level is not increased for simple async commands. (bugzilla for this one is https://bugzilla.redhat.com/show_bug.cgi?id=344411 ) I'm attaching a patch that was applied over that one, so it just shows what the final solution is like, it's not a

vi mode is unable to repeat insert actions after deletion etc.

2008-01-15 Thread Tomas Janousek
nsert == 'a') && rl_undo_list) + if ((_rl_vi_last_key_before_insert == 'i' || _rl_vi_last_key_before_insert == 'a' || _rl_vi_last_key_before_insert == 'I') && rl_undo_list) _rl_vi_save_insert (rl_undo_list); /* XXX - Other keys probably need to be checked. */ else if (_rl_vi_last_key_before_insert == 'C') -- Tomas Janousek, SW Engineer, Red Hat, Inc.

A few man page fixes from RHEL-5

2008-02-04 Thread Tomas Janousek
Hello, these three patches have been accepted into RHEL-5.2 and I think they may be worth including in bash upstream. More info at , and .

Re: SEGV on unbounded recursion

2008-03-09 Thread Tomas Janousek
think the > effort involved in handling tail recursion is well spent. Okay, I'm ok with this, thanks for your opinion. -- Tomas Janousek, SW Engineer, Red Hat, Inc.

Re: propagating environment variable via internal command

2018-06-20 Thread Tomas Janousek
Hi Chet and Tomáš, On Wed, Jun 20, 2018 at 10:42:07AM -0400, Chet Ramey wrote: > On 6/20/18 9:25 AM, Tomáš Čech wrote: > >  $ /bin/sh > >  sh-4.4$ VARIABLE=value set -o noglob > >  sh-4.4$ env | grep VARIABLE > >  VARIABLE=value > >  sh-4.4$ > > Posix requires this behavior, which dates back to t

History not saved when closing terminal while bash is sourcing a script

2019-08-03 Thread Tomas Janousek
Hello, today I was wondering why I'm sometimes losing history entries and found out that bash (5.0.3(1)-release, on Debian testing) won't save the history file on closing the terminal window if it's currently sourcing something. I'm attaching a script that uses tmux to simulate the scenario. On my

Re: History not saved when closing terminal while bash is sourcing a script

2019-08-08 Thread Tomas Janousek
Hi, On Sun, Aug 04, 2019 at 01:42:12PM -0400, Chet Ramey wrote: > On 8/3/19 11:05 AM, Tomas Janousek wrote: > I don't have or use tmux, but I'm going to guess that `kill-window' sends > a SIGHUP to the process group and follows it up with a SIGKILL. The > `source&#

Re: Bash-5.1-rc1 available

2020-11-02 Thread Tomas Janousek
Hi Chet, On Mon, Oct 26, 2020 at 10:12:59AM -0400, Chet Ramey wrote: > Yes, you can disable bracketed paste mode. I'll make sure that turning off > bracketed paste mode disables the active region for incremental searches. Would you please consider making this configurable separately? I'd love to

lastpipe doesn't lastpipe when stdin (fd 0) is closed

2020-12-16 Thread Tomas Janousek
Hi, bash-5.1 (and judging from git blame, all versions that ever supported lastpipe, so 4.2+) fails to honor lastpipe when run without fd 0: $ bash -O lastpipe -c 'echo x | read x; echo x=$x' x=x $ bash -O lastpipe -c 'echo x | read x; echo x=$x' <&- x= $ bash -O lastpipe