Re: undesired behavior... reason is.. bug? or feature-deficit

2015-03-04 Thread Eduardo A . Bustamante López
> So I'm wondering -- why didn't the alias call the function. dualbus@hp ~ % type setsid setsid is /usr/bin/setsid So, basically you did: external-program anotherprogram And external-program only knows how to execute programs, not bash functions. Put the setsid inside the function, and remov

Re: [Bug-readline] Problem with CTRL-z and readline()

2015-03-04 Thread Chet Ramey
On 3/2/15 9:29 AM, Dave Wysochanski wrote: > I agree this is what is happening - the signal handler loops around > pathologically trying the same operation and getting the same result. > Can you explain why the problem is intermittent? I can reproduce it but > not always. It's a race condition:

undesired behavior... reason is.. bug? or feature-deficit

2015-03-04 Thread Linda Walsh
I've been working with c++ files recently, and wrote a function to help open the ".{cc,h}" files together using "-p" (open the files in separate tabs) in 'vim' ('gvim' actually). I just tried the function on windows where it ran into interference. On windows, in order to get the windows version

Re: Strange file -i

2015-03-04 Thread Mike Frysinger
On 04 Mar 2015 23:07, Stephane Chazelas wrote: > Note that only GNU utilities (or utilities using GNU getopt > without enforcing standard mode) accept options after arguments. nice that they do too. it's super obnoxious having to manually sort flags. i hate having to use BSD systems w/out GNU use

Re: Strange file -i

2015-03-04 Thread Stephane Chazelas
2015-03-04 09:25:46 -0600, John McKown: > On Wed, Mar 4, 2015 at 7:43 AM, Eric Blake wrote: > > On 03/04/2015 01:44 AM, Jean Delvare wrote: > >> Hi Chet, > >> > >> Did you really intend to create an empty file named "-i" in > >> http://git.savannah.gnu.org/cgit/bash.git/diff/?id=43aebe922bc2a614c4

Re: Bug in sh_backslash_quote function (bash 4.3.33)

2015-03-04 Thread Алексей Верещагин
Yes, the problem is with signed char on some platforms. Similar to "sh_backslash_quote" functions in shquote.c uses "register unsigned char" or "unsigned char" types for variable "c" (see "sh_double_quote" or "sh_backslash_quote_for_double_quotes") but "sh_backslash_quote" still use "int". And it i

Re: Bug in sh_backslash_quote function (bash 4.3.33)

2015-03-04 Thread Eric Blake
On 03/04/2015 10:59 AM, Верещагин Алексей wrote: > Bash Version: 4.3.33 > File: lib/sh/shquote.c > Function: sh_backslash_quote > Line: if (backslash_table[c] == 1) > > Description > --- > Variable "c" has signed integer type and may be negative (if "string" is > not only ASCII characters

Bug in sh_backslash_quote function (bash 4.3.33)

2015-03-04 Thread Верещагин Алексей
Bash Version: 4.3.33 File: lib/sh/shquote.c Function: sh_backslash_quote Line: if (backslash_table[c] == 1) Description --- Variable "c" has signed integer type and may be negative (if "string" is not only ASCII characters string). But "c" used as an index in "backslash_table" array. This

Re: Strange file -i

2015-03-04 Thread Jean Delvare
Hi Eric, Le Wednesday 04 March 2015 à 06:43 -0700, Eric Blake a écrit : > On 03/04/2015 01:44 AM, Jean Delvare wrote: > > Did you really intend to create an empty file named "-i" in > > http://git.savannah.gnu.org/cgit/bash.git/diff/?id=43aebe922bc2a614c410e282fdf772e063454168 > > ? > > Yes: htt

Re: Strange file -i

2015-03-04 Thread John McKown
On Wed, Mar 4, 2015 at 7:43 AM, Eric Blake wrote: > On 03/04/2015 01:44 AM, Jean Delvare wrote: >> Hi Chet, >> >> Did you really intend to create an empty file named "-i" in >> http://git.savannah.gnu.org/cgit/bash.git/diff/?id=43aebe922bc2a614c410e282fdf772e063454168 >> ? > > Yes: https://lists.

RE: BUG: echo call function

2015-03-04 Thread x Slack x Ruan
I understand the use of ''. But in this case could not be a interrupt call? So it is no loop, the problem persists even if there is space between the ``. I performed a test yesterday and got results. FUNCNAME="$(declare -F | awk '{print $3}')" FUNCECHO="$(declare -f | grep -o "`.*`"

Re: BUG: echo call function

2015-03-04 Thread Greg Wooledge
On Wed, Mar 04, 2015 at 11:42:19AM -0300, x Slack x Ruan wrote: > I understand the use of ''. > But in this case could not be a interrupt call? > So it is no loop, the problem persists even if there is space between the ``. Spaces in the command are not relevant. You are calling yourself recurs

Re: BUG: echo call function

2015-03-04 Thread Eduardo A . Bustamante López
Recursion is not a bug, it's a feature of the language.

Re: Strange file -i

2015-03-04 Thread Eric Blake
On 03/04/2015 01:44 AM, Jean Delvare wrote: > Hi Chet, > > Did you really intend to create an empty file named "-i" in > http://git.savannah.gnu.org/cgit/bash.git/diff/?id=43aebe922bc2a614c410e282fdf772e063454168 > ? Yes: https://lists.gnu.org/archive/html/bug-bash/2014-07/msg00075.html -- Er

Re: BUG: echo call function

2015-03-04 Thread John McKown
On Tue, Mar 3, 2015 at 9:17 PM, x Slack x Ruan wrote: > Good evening. > > My name is Ruan, was doing some scripting with bash, to launch a script my > system crashed and restarted. > When I look at the command syntax. > > > function example () { >echo `example` > }

Re: BUG: echo call function

2015-03-04 Thread John McKown
That is interesting. But it makes sense to me. And I would not consider it a bug. BASH is doing what you told it to do. It is a recursive call. But I do think that Chet would agree that crashing the OS is a "bad thing" [grin]. I'm just not too sure what he could do about it. If it were my system, I

Strange file -i

2015-03-04 Thread Jean Delvare
Hi Chet, Did you really intend to create an empty file named "-i" in http://git.savannah.gnu.org/cgit/bash.git/diff/?id=43aebe922bc2a614c410e282fdf772e063454168 ? Thanks, -- Jean Delvare SUSE L3 Support