Re: -e and permission denied

2013-10-04 Thread Chris Down
On 2013-10-04 02:18, vic...@vsespb.ru wrote: > > The operating system is (on purpose) not letting you know if that file > > exists or not > > OS is not lying about file existence. It returns "permission denied" error, > which means file may or may not exist. Nobody said the OS is lying, it's merel

Re: Bash 4.2 completion fails with failglob option enabled

2013-10-04 Thread Chris Down
On 2013-10-04 09:35, Chet Ramey wrote: > On 10/4/13 3:32 AM, Chris Down wrote: > > On 2013-10-02 16:33, Andrey Osipov wrote: > >> Is failglob meant to be used in interactive shell? > > > > Basically, you can't use it right now if you are using completions tha

Re: can't just hold down ^K to clean up history

2013-10-16 Thread Chris Down
On 2013-10-16 20:53, jida...@jidanni.org wrote: > Let's say one accidentally pastes a many lines of some email into a bash > window. Firstly: you should be careful not to do that. > Yes bash tries to execute each line. Can't blame it. Well, it's the expected behaviour. Bash doesn't know the diff

Re: Bash-4.3-beta2 available for FTP

2013-11-05 Thread Chris Down
On 2013-11-05 23:12:00 +0100, Lionel Cons wrote: > Build instructions: > git clone --branch devel git://git.savannah.gnu.org/bash.git If you're only planning on sending in e-mail patches, then you might as well use --depth 1. pgpCGcGWdbeAL.pgp Description: PGP signature

Re: Testcase for cd -@ / O_XATTR

2013-11-06 Thread Chris Down
On 2013-11-06 22:23:41 -0500, Chet Ramey wrote: > I'll think about it. I generally don't like to add test cases for features > that are available on so few platforms. Why? Surely that is the place where such test cases would be most valuable? pgpkMsDg4AKUh.pgp Description: PGP signature

Replacing addresses

2013-11-28 Thread Chris Down
On 2013-11-28 08:23:01 -0400, Peter Cordes wrote: > Oh, also, the online bug-bash archive has a bad habbit of replacing > code with address@hidden. There was a whole thread about setting > PS1=whatever that is now a complete mystery to non-subscribers! Yes, let's please stop this useless obfusca

Re: Replacing addresses

2013-11-28 Thread Chris Down
On 2013-11-28 13:01:49 -0500, Chet Ramey wrote: > I think this is a global setting Ouch. > and probably does more good than the annoyance it causes. I don't think so. From my anecdotal experience, I've only ever had it cause irritation when reading the archives. There are a million better ways t

Re: I think bash logic in a loop like : while [ condition] |read somevar is flawed.

2013-12-23 Thread Chris Down
On 2013-12-23 23:57:32 +0100, rens wrote: > Hello, > > this script: > ___ > export cval=0 > echo entering while > > # listing ten files, to generate some output to count. > ls -1 /usr/bin|head -10 |while read fname Just use a `for` loop and a glob. Really. It's that easy. >

Re: soft-bug (should be in planning queue)...

2013-12-23 Thread Chris Down
On 2013-12-21 14:13:25 -0800, Linda Walsh wrote: > Did you mean july 2013? Probably not, plenty of 4.3 code is not being backported. pgprkzu2zkgSh.pgp Description: PGP signature

Re: I think bash logic in a loop like : while [ condition] |read somevar is flawed.

2013-12-24 Thread Chris Down
On 2013-12-24 09:25:05 +0100, rens wrote: > *read is a built in. there is no subshell. $ echo "$BASHPID"; : | echo "$BASHPID" 26269 26271 > any way, it seems then to me that even IF "read" was a subshell, the scope > of that would start and end with the read statement. I don't know

Re: I think bash logic in a loop like : while [ condition] |read somevar is flawed.

2013-12-24 Thread Chris Down
On 2013-12-24 10:16:28 +0100, rens wrote: > you are a master at evading the issue. > > and therefore, i.m.h.o, completely useless as a programmer. You appear to have become confused into thinking that I have an interest in helping people that do not want to listen or learn. I apologise if I misl

Re: problem with pathname expansion

2013-12-26 Thread Chris Down
On 2013-12-27 07:16:12 +0400, vollitwr . wrote: > Thank you very much. You had explainded the problem. However it does > not remove it. :-( It is not bug according to documentation. But it > is the pure formality only. It looks like deep and conceptual error > beyond scope of the bash developer

Setting "cdspell" does not return error in a non-interactive shell

2013-12-28 Thread Chris Down
From "man 1 bash" on 4.2.45: cdspell If set, minor errors in the spelling of a directory com‐ ponent in a cd command will be corrected. The errors checked for are transposed characters, a missing charac‐ ter, and one character too many. If a

Re: For loop prints two $values instead of one

2014-01-06 Thread Chris Down
Hello, On 2014-01-07 00:45:42 +0200, DanielB wrote: > I've a problem with bash array loop. > > the following code instead of printing each value separately, joins two > values and prints them as if they are one. > > declare -a array=( 'sf052' 'to060' 'pw' 'qb099' 'pw22' 'wp039' 'wx12' > 'wx11' )

Re: Why bash doesn't have bug reporting site?

2014-01-13 Thread Chris Down
On 2014-01-13 12:26:43 -0800, Yuri wrote: > I noticed that bash is in absolute minority of projects not using any bug > reporting system. Instead, users are directed to this ML to report bugs. > It seems like it could have been very beneficial so that people could track > the status of the issues.

Re: tab expansion of $HOME/ to \$HOME/

2014-01-13 Thread Chris Down
On 2014-01-13 11:00:09 +0100, Diggory Hardy wrote: > If I enter > > $ ls $HOME/Do > > and press the Tab key, bash expands to > > $ ls \$HOME/Documents See this older thread[0]. If you bash >= 4.2.29 (which it appears you do), you can turn on `direxpand' to get the old behaviour back by using `

Re: tab expansion of $HOME/ to \$HOME/

2014-01-13 Thread Chris Down
On 2014-01-13 20:42:39 -0500, Chet Ramey wrote: > You can set the `direxpand' option and probably get around most of this, > with the change that variables will be expanded upon completion, as in > bash-4.1. Er, somehow I missed this reply. Sorry for duplicating the content. pgpVryxnvHcrm.pgp De

Re: Why bash doesn't have bug reporting site?

2014-01-13 Thread Chris Down
On 2014-01-13 22:31:01 -0800, Yuri wrote: > e-mail has quite a few vulnerabilities. Spam, impersonation, etc. In the > system relying on e-mail, spam filter has to be present. And due to this you > will get false positives and false negatives, resulting in lost information. > On the opposite, login

Re: Including \t, \T or \A at beginning of PS1 causes line wrap issues

2014-01-14 Thread Chris Down
Hello, On 2014-01-15 00:17:22 -0600, David C. Rankin wrote: > I apologize if you get two of these reports, but my server responded that > the > mail did not go through when I exited vi. Here is the contents generated by > bashbug about the line wrap issue when including \t, \T or \A at beginnin

Re: Including \t, \T or \A at beginning of PS1 causes line wrap issues

2014-01-14 Thread Chris Down
Hello, On 2014-01-15 00:17:22 -0600, David C. Rankin wrote: > I apologize if you get two of these reports, but my server responded that > the > mail did not go through when I exited vi. Here is the contents generated by > bashbug about the line wrap issue when including \t, \T or \A at beginnin

Re: Including \t, \T or \A at beginning of PS1 causes line wrap issues

2014-01-16 Thread Chris Down
+Cc: bug-bash Please do not take discussions off-list, it decreases the value of conversations for future readers. On 2014-01-16 23:13:35 -0600, David C. Rankin wrote: > A sanitized version w/o color. That detail matters -- please include the full scope of the issue in future when reporting issu

Re: Following symlinks in globstar

2014-01-21 Thread Chris Down
On Thu, 1 Aug 2013 13:02:31 +0200, Chris Down wrote: > As we're probably all aware, `globstar' follows symlinks when doing > recursive traversal. Is it possible to, at some future version, have > an option that enables/disables (I guess enables by default for > backwards co

Re: let's establish BASH_MINIMUM_TIME_BETWEEN_INTERACTIVE_COMMAND

2014-01-29 Thread Chris Down
On 2014-01-30 09:18:19 +0800, jida...@jidanni.org wrote: > So let's establish BASH_MINIMUM_TIME_BETWEEN_INTERACTIVE_COMMAND=1.0 Well, you can do this with PROMPT_COMMAND='sleep 1'. I don't see the need for another internal variable to do this. pgpTYMNSu6HsQ.pgp Description: PGP signature

Re: let's establish BASH_MINIMUM_TIME_BETWEEN_INTERACTIVE_COMMAND

2014-01-29 Thread Chris Down
On 2014-01-29 21:03:12 -0700, Bob Proulx wrote: > Eduardo A. Bustamante López wrote: > > Chris Down wrote: > > > Well, you can do this with PROMPT_COMMAND='sleep 1'. I don't see the > > > need for another internal variable to do this. > > > >

Re: Associative array assignment crashes Bash interpreter

2014-02-02 Thread Chris Down
First of all, please fix your broken From header. It should be b...@franklin.gtkcentral.net when you are addressing the wider Internet, not ben@franklin. On 2013-12-13 05:25:17 -0500, ben@franklin wrote: > Description: > The included scripts generate a "division by zero" and "recursion level

Re: Associative array assignment crashes Bash interpreter

2014-02-03 Thread Chris Down
On 2014-02-03 08:52:20 -0500, Chet Ramey wrote: > I'm going to assume from the date and the Received: headers that this is > just a case of a mail queue getting flushed. The message looks like it > sat in a queue for around 50 days. Ah, I didn't see the date on the original mail. My bad. pgpbZ4

Re: Hitting C-c C-c in Emacs' *shell* causes segmentation fault

2014-02-06 Thread Chris Down
On 2014-02-06 22:16:56 -0500, Chet Ramey wrote: > OK, I'll bite. What is C-c C-c supposed to do? It looks like it just > spews a bunch of garbage to your screen. Is that the intent? According to the Emacs manual[0]: > Interrupt the shell or its current subjob if any > (comint-interrupt-subjob)

Re: typo in bash manual

2014-03-01 Thread Chris Down
On 2014-03-01 11:29:03 -0800, Dave Yost wrote: > In http://www.gnu.org/software/bash/manual/bashref.html#GNU-Parallel > > Where you say > ls *.gz | parallel -j+0 "zcat {} | bzip2 >{.}.bz2 && rm {}" > This will recompress all files in the current directory with names ending in > .gz using bzip2, r

Re: typo in bash manual

2014-03-02 Thread Chris Down
On 2014-03-02 06:30:07 -0800, Ryan Cunningham wrote: > Apparently I am not reading it wrong. Read my previous e-mail to this > list on this thread. If you had paid attention and looked at my reply more closely, you would have noticed that the e-mail was not even addressed to you, it was addressed

Re: When a hashed pathname is deleted, search PATH

2014-03-19 Thread Chris Down
Linda Walsh writes: > If this was a reactor control program, that's one thing, but in > deciding what solution to implement to save some small lookup time or > throw it away, an 90% solution is probably fine. It's called a > heuristic. AI machines use them. Thinking people use them. Why > shoul

Re: printf cannot write more than one line to /proc/pid/uid_map

2014-03-25 Thread Chris Down
Pádraig Brady writes: > If you want to use the external printf to achieve more > standard buffering modes, you can use `env` like: > > env printf '%s' '0 0 1\n1 1 1' > /proc/31861/uid_map While this will probably work, the more typical way to do this is with command(1P). pgpOycint6nTB.pgp Des

Re: printf cannot write more than one line to /proc/pid/uid_map

2014-03-25 Thread Chris Down
Chet Ramey writes: > `command' is a shell builtin that will run shell builtins. It only skips > shell functions. Huh, I guess I have been using zsh for too long. I forgot that the behaviour in bash/POSIX is not the same. pgpYBta6iEqrR.pgp Description: PGP signature

Re: multiline ^C regression

2014-03-27 Thread Chris Down
garbage after the > new prompt. Cannot reproduce: chris@lakes:~$ while : > do > : > : > :^C chris@lakes:~$ echo $BASH_VERSION 4.3.0(1)-release Does this happen when you execute bash without sourcing the profile/rc? pgpK34IskcEjm.pgp Description: PGP signature

Re: multiline ^C regression

2014-03-27 Thread Chris Down
Egmont Koblinger writes: > Sorry, I wasn't clear enough. > > By "multiline" I mean a simple command that is so long (e.g. takes so many > parameters) that it cannot fit into a single line. (You reach the right > margin of your terminal and keep on typing.) I can reproduce that, and the subsequen

Re: ls doesn't work in if statements in bash 4.3

2014-03-27 Thread Chris Down
billyco...@gmail.com writes: > > huge wall of text First of all, please follow basic etiquette and trim your quotes to what is relevant. I can't even fit your e-mail on my entire screen. > On one hand I realize you think you're being helpful to someone who > has just started bash programming, but

Re: /dev/fd/62: No such file or directory

2014-04-05 Thread Chris Down
Linda Walsh writes: > So all I need do is test the first entry: > >local -a entries=("$1"/*) >[[ ${entries[0]} == $1/* ]] && return 0 > > --- the $1 doesn't need quotes in [[]] and '*' won't expand or > am missing something? Thanks for the tip Pierre, I often > don't see forests because

Re: /dev/fd/62: No such file or directory

2014-04-05 Thread Chris Down
Linda Walsh writes: > Pattern matching? Why doesn't '*' match anything then? I've no idea what you're doing, but: $ var='*bar*' $ [[ abarb = $var ]] $ echo $? 0 $ [[ aquxb = $var ]] $ echo $? 1 pgpUZ39g3TPmc.pgp Description: PGP signature

Re: UTF-8 printf string formating problem

2014-04-05 Thread Chris Down
Jan Novak writes: > printf string format counts bytes instead of chars, which leads to > broken output According to POSIX, printf's field width control is strictly in bytes, not characters.[0] > field width: > An optional string of decimal digits to specify a minimum field > width. For a

Re: Expansion of exclamation mark in single quotes in subcommand

2014-04-21 Thread Chris Down
Maxdamantus writes: > This seems like a bug, but it seems to have been here for a few years > (from the git repository, bash-3.0 displays this behaviour while > bash-2.05b doesn't). > > With history expansion enabled (set +H): > > $ echo '!!' # good > !! > $ echo "$(echo '!!')" # not good; !! exp

Re: Expansion of exclamation mark in single quotes in subcommand

2014-04-21 Thread Chris Down
Maxdamantus writes: > It's not just inside a double-quoted block. It's inside a single-quoted block. No, your ultimate expansion is in a double quoted block. What happens inside the command substitution does not matter. > The last two commands in my first email demonstrate that the $ > expansion

Re: Expansion of exclamation mark in single quotes in subcommand

2014-04-21 Thread Chris Down
Chris Down writes: > !! is not single-quoted in the ultimate expansion (bash knows nothing > about what happens inside the subshell), which is all that matters. It's > not too late to perform history expansion (which is different than > parameter expansion). To be more c

Re: typo in bashbug.sh of bash-4.3

2014-06-16 Thread Chris Down
What makes you think that that is a "typo" and not just some spacing that is other than your preference? That syntax (with or without spacing) is perfectly legal when referencing a descriptor. pgpSOER74XdS5.pgp Description: PGP signature

Re: typo in bashbug.sh of bash-4.3

2014-06-16 Thread Chris Down
Chris Down writes: > What makes you think that that is a "typo" and not just some spacing > that is other than your preference? That syntax (with or without > spacing) is perfectly legal when referencing a descriptor. Apparently I forgot that's a zsh feature, not a POS

Re: umask --help

2014-07-07 Thread Chris Down
Hi Jon, As is standard with other buitins, umask is documented at `help umask`: chris@gopher:~$ help umask umask: umask [-p] [-S] [mode] Display or set file mode mask. Sets the user file-creation mask to MODE. If MODE is omitted, prints the current value

Re:

2014-07-16 Thread Chris Down
Hi Tran, I think you've misunderstood the intent of Chet's reply. Nobody disagrees that the RSS should not increase. The reason that you're being asked for valgrind output is because the problem has yet to be reproduced, and the valgrind output might shed some light on where the problem lies,

Re: SEGFAULT if bash script make "source" for itself

2014-08-28 Thread Chris Down
I really don't understand -- why is this unexpected? It's exactly what I'd expect to happen if you try to do something like that. It should not be disallowed to source yourself, that prevents people from doing things when *sensibly* sourcing their own script.

Re: SEGFAULT if bash script make "source" for itself

2014-08-28 Thread Chris Down
bogun.dmit...@gmail.com writes: Is it so heavy to check length of $BASH_SOURCE array? Adding artificial barriers that don't actually solve the problem are "heavy" in terms of technical debt, even if not code.

Re: SEGFAULT if bash script make "source" for itself

2014-08-28 Thread Chris Down
bogun.dmit...@gmail.com writes: And what for this mailing list? Don't answer, this have no any sense any more. This mailing list is for reporting bugs. So far nobody thinks that what you reported is a bug, so you would essentially be making a feature request. If you want to prioritise that, i

Re: SEGFAULT if bash script make "source" for itself

2014-08-28 Thread Chris Down
bogun.dmit...@gmail.com writes: O... you have more serious bugs Than fixing a segfault that occurs when the user is obviously doing something stupid? Sure.

bash 3.2 won't run configure script from kdelibs-3.5.5

2006-10-14 Thread Chris Clayton
Configuration Information [Automatically generated, do not change]: Machine: i386 OS: linux-gnu Compiler: i386-pc-linux-gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i386-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale

bash: error exporting/importing function with here document

2007-05-04 Thread Chris Lesner
This seems to be broken in several version of bash including: version 3.00.16(1)-release (i386-pc-linux-gnu) Configuration Information [Automatically generated, do not change]: Machine: i386 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' -DCONF_OSTYPE='lin

missing dependency breaks -j build occasionally (bash 3.2 pl 17)

2007-08-15 Thread Chris MacGregor
It happens rarely, but it just did. Building bash with "make -j5" came to a screeching halt with error below. Note that the job make was waiting to finish was generating the very file needed by nojobs.c. I presume that a dependency needs to be added someplace. Apologies for not including a

bash segmentation fault executing non-built-in commands in a suspect directory

2008-12-16 Thread chris cross
Configuration Information [Automatically generated, do not change]: Machine: i686 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/local/share/locale' -DPAC

Re: Feature Idea: Enhanced Tab Completion

2009-03-21 Thread Chris Jones
On Sat, Mar 21, 2009 at 01:01:51PM EDT, Cam Cope wrote: > I'm sorry if the feature has already been implemented, I haven't heard > of any way to implement it. This is what I was thinking of: Right now, > if you run history, it will list out all the recently used commands, > and then you could run

Re: Feature Idea: Enhanced Tab Completion

2009-03-21 Thread Chris Jones
On Sat, Mar 21, 2009 at 01:16:12PM EDT, Ken Irving wrote: > This sounds a lot like what you get with the reverse-search-history > command, bound to control-r (C-r), a great feature indeed. Priceless. I had posted the following obfuscated explanation a couple of hours ago but since I was subscr

Re: Feature Idea: Enhanced Tab Completion

2009-03-21 Thread Chris Jones
On Sat, Mar 21, 2009 at 04:59:36PM EDT, Bob Proulx wrote: > Chris Jones wrote: > > I had posted the following obfuscated explanation a couple of hours > > ago but since I was subscribed under a different address, it never > > made it to the list. > > > > :-( &g

Color prompt issues - debian lenny - UTF-8

2009-06-29 Thread Chris Jones
Not sure whether this is a bug in my version of bash, but I copied over my colored PS1 prompts from debian etch - regular user & root - and some convenient keyboard actions are misbehaving. After retrieving a command from the history via a CTRL-R, an ensuing CTRL-A moves the cursor to somewhere in

bash prompt misbehaving - correction.

2009-06-30 Thread Chris Jones
Not sure whether this is a bug in my version of bash, but I copied over my colored PS1 prompts from debian etch - regular user & root - and some convenient keyboard actions are misbehaving. After retrieving a command from the history via a CTRL-R, an ensuing CTRL-A moves the cursor to somewhere in

Re: bash prompt misbehaving - correction.

2009-06-30 Thread Chris Jones
On Tue, Jun 30, 2009 at 05:23:27AM EDT, Bernd Eggink wrote: > Chris Jones schrieb: >> ... > > After retrieving a command >> from the history via a CTRL-R, an ensuing CTRL-A moves the cursor to >> somewhere in the middle of the prompt and CTRL-E is short of the >>

Re: bash prompt misbehaving - correction.

2009-06-30 Thread Chris Jones
On Tue, Jun 30, 2009 at 08:30:35AM EDT, Chet Ramey wrote: > Chris Jones wrote: > > Not sure whether this is a bug in my version of bash, but I copied over > > my colored PS1 prompts from debian etch - regular user & root - and some > > convenient keyboard actions are misb

Re: bash prompt issue - lenny - UTF-8.

2009-06-30 Thread Chris Jones
On Tue, Jun 30, 2009 at 01:34:21PM EDT, Chet Ramey wrote: > Chris Jones wrote: [..] > > Is there anything that happened between 3.2.39 & 3.2.49 that might > > account for this, or would you suspect a problem with my setup? > > I would assume that one of the patches addr

Colored prompt length is not correctly computed - UTF-8

2009-07-04 Thread Chris Jones
Configuration Information [Automatically generated, do not change]: Machine: i486 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i486' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i486-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='ba

Colored prompt length is not correctly computed - Correction.

2009-07-04 Thread Chris Jones
On Sat, Jul 04, 2009 at 12:18:51PM EDT, Chris Jones wrote: > Configuration Information [Automatically generated, do not change]: > Machine: i486 > OS: linux-gnu > Compiler: gcc > Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i486' > -DCONF_OSTYP

Re: Colored prompt length is not correctly computed - UTF-8

2009-07-04 Thread Chris Jones
On Sat, Jul 04, 2009 at 02:56:20PM EDT, Chet Ramey wrote: [..] > Thanks for the report. I can reproduce this on bash-3.2.49, and it's > fixed in bash-4.0. Thanks for confirming I was not hearing voices or something :-) Is there a 4.0 .deb available..? I just compiled: http://ftp.gnu.org/gn

Re: Colored prompt length is not correctly computed - UTF-8

2009-07-05 Thread Chris Jones
On Sat, Jul 04, 2009 at 11:20:56PM EDT, Bob Proulx wrote: > Chris Jones wrote: > > Is there a 4.0 .deb available..? > A bash 4.0 .deb is available in Debian's experimental distribution. I > don't know if the dependencies it was compiled with are available in > Lenny o

[OT] regarding 'time' builtin

2009-07-17 Thread Chris Jones
On Fri, Jul 17, 2009 at 04:54:51PM EDT, Dave B wrote: > On Friday 17 July 2009, Linda Walsh wrote: > > > where does the output from the 'time' command "go" > > > > I.e. if I wanted to pipe the output to a prog or file, how would I > > go about doing it? > > Please see > > http://mywiki.wooledge.

Buffer underflow in help builtin with narrow window

2009-10-01 Thread Chris Hall
Configuration Information [Automatically generated, do not change]: Machine: i686 OS: linux-gnu Compiler: i686-pc-linux-gnu-gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/loc

Re: Any guide about writing my own bash built-in commands?

2010-01-28 Thread Chris Jones
On Thu, Jan 28, 2010 at 08:42:25PM EST, Clark J. Wang wrote: > Hi all, > I want to write my own built-in bash commands but I cannot find any > info about that in bash manual. Anyone has any idea? Never done that myself but I found this excellent introductory article: http://cfajohnson.com/shell

Minority/Women Business Conference

2005-03-28 Thread Chris Pankrantz
Title: DiversityBusiness.com | 2004 Multicultural Business Conference Friendly Reminder: If you have not register for the upcoming conference you still have time to do so! If you only attend one conference  a year you will not want to miss this opportunity to hear from the nation's

v4.4 segfault in 'decode_prompt_string' when processing special parameter

2018-07-21 Thread Chris Schoenberg
This only works in 4.4; earlier versions throw a 'bad substitution' error. It causes an infinite loop of calls between 'expand_prompt_string' and 'decode_prompt_string', where calls to 'xmalloc' exhaust the heap: $\{_@P};${_@P} I decided to report this because it is not a user-defined recursive f

Re: v4.4 segfault in 'decode_prompt_string' when processing special parameter

2018-07-21 Thread Chris Schoenberg
The payload got filtered, so here it is again (substitute the actual character for [at]): $\{_[at]P};${_[at]P} On Sat, Jul 21, 2018, 1:47 PM Chris Schoenberg wrote: > This only works in 4.4; earlier versions throw a 'bad substitution' error. It > causes an infinite loop

Re: v4.4 segfault in 'decode_prompt_string' when processing special parameter

2018-07-21 Thread Chris Schoenberg
Fair enough. Even though the behavior is different, the end is the same as udf so makes sense of you want to leave it. Weird how it popped up in 4.4 though. On Sat, Jul 21, 2018, 6:58 PM Chet Ramey wrote: > On 7/21/18 2:47 PM, Chris Schoenberg wrote: > > This only works in 4.4; earlier

Re: v4.4 segfault in 'decode_prompt_string' when processing special parameter

2018-07-21 Thread Chris Schoenberg
Thanks for taking the time to explain that :) I'll do more homework next time On Sat, Jul 21, 2018, 8:51 PM Chet Ramey wrote: > On 7/21/18 9:16 PM, Chris Schoenberg wrote: > > Fair enough. Even though the behavior is different, the end is the same > as > > udf so mak

Locale not Obeyed by Parameter Expansion with Pattern Substitution

2019-11-17 Thread Chris Carlen
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -g -O2 -Wno-parentheses -Wno-format-security uname output: Linux safire 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

Change in SIGTERM behaviour in bash 4.3 when using readline

2020-03-04 Thread Chris Down
ll from CHANGES or NEWS: they mention some of the compile-time options around SIGTERM and rl_signal_event_hook, but I can't really tell the intent when it comes to this behaviour in particular. Certainly it came as a surprise to me, at least. Thanks, Chris 0: https://unix.stackexchange.com/q/571123/10762

Re: Change in SIGTERM behaviour in bash 4.3 when using readline

2020-03-04 Thread Chris Down
Ah, it's been a while since I did this and I forgot about the granularity of the devel branch :-) There it bisects to 73a146bec7f75da9f78f6d54329c980b75a2318d ("commit bash-20130215 snapshot"). I'm pretty sure it's related to this change to add the signal handler inside initialize_shell_signal

Re: Change in SIGTERM behaviour in bash 4.3 when using readline

2020-03-04 Thread Chris Down
Chris Down writes: I'm not quite sure how best to handle this, maybe setting SIG_IGN as the default signal handler for interactive shells if there's nothing to inherit? This is one of those cases where SA_RESTART doesn't quite mimic SIG_IGN... This seems too simple, so I assum

Re: performance bug of [[ $x ]]

2020-03-07 Thread Chris Down
Peng Yu writes: [[ $x ]] just tests whether the variable $x is of length 0 or not. So its performance should not depend on how long the variable is. Who said it has anything to do with the [[ builtin's performance? A shell does a lot more than just running one command. For this and the last

Re: performance bug of [[ $x ]]

2020-03-07 Thread Chris Down
Peng Yu writes: Could you show me how you do the profiling for this specific case? Based on what proof that you can conclude that it is not the `[[` performance problem? Like I said, `perf` is perfectly adequate. bash -c 'x=$(printf "%.sx" {1..1000}); perf record -g -p $$ & sleep 2; t

Re: Exclamation mark does not work with set -e

2020-04-06 Thread Chris Down
f...@florentbordignon.fr writes: The following assertion succeeds when it should not : set -e ! true echo Hello # prints Hello but should not Please do read the documentation before reporting bugs :-) If you read the documentation for `-e`, you'll see that if the command is being inverted wit

Return from function depending on number of parameters

2020-07-03 Thread Chris Elvidge
...] actually obsolete? If so, what should I use at the bash prompt to get the same effect? Cheers -- Chris Elvidge

Re: Return from function depending on number of parameters

2020-07-04 Thread Chris Elvidge
On 03/07/2020 10:39 pm, Lawrence Velázquez wrote: On Jul 3, 2020, at 2:00 PM, Chris Elvidge wrote: However 'N=0; echo $((!$N))' gives an error at the bash prompt. 'echo $[!$N]' echo's 1 as expected. My question - is $[...] actually obsolete? It might tell you som

Re: Return from function depending on number of parameters

2020-07-04 Thread Chris Elvidge
On 03/07/2020 11:16 pm, Eli Schwartz wrote: On 7/3/20 2:00 PM, Chris Elvidge wrote: I've used 'return $((!$#))' and 'return $[!$#]' to return an error if no parameters given to function. Tested in a bash script 'exit $((!$#)) / $[!$#]' - both work. 'ech

Re: Return from function depending on number of parameters

2020-07-04 Thread Chris Elvidge
On 03/07/2020 10:39 pm, Lawrence Velázquez wrote: On Jul 3, 2020, at 2:00 PM, Chris Elvidge wrote: However 'N=0; echo $((!$N))' gives an error at the bash prompt. 'echo $[!$N]' echo's 1 as expected. My question - is $[...] actually obsolete? It might tell you som

Re: Return from function depending on number of parameters

2020-07-04 Thread Chris Elvidge
On 03/07/2020 11:16 pm, Eli Schwartz wrote: On 7/3/20 2:00 PM, Chris Elvidge wrote: I've used 'return $((!$#))' and 'return $[!$#]' to return an error if no parameters given to function. Tested in a bash script 'exit $((!$#)) / $[!$#]' - both work. 'ech

Re: Return from function depending on number of parameters

2020-07-09 Thread Chris Elvidge
On 06/07/2020 12:50 pm, Greg Wooledge wrote: On Fri, Jul 03, 2020 at 07:00:54PM +0100, Chris Elvidge wrote: I've used 'return $((!$#))' and 'return $[!$#]' to return an error if no parameters given to function. The problem with this is that it *always* returns fro

Re: Return from function depending on number of parameters

2020-07-10 Thread Chris Elvidge
it. Are the two uses (array subscript and arithmetic context) of [...] connected/related? Or am I (stupidly) seeing a connection where none really exists? Thanks -- Chris Elvidge England

File descriptor leak

2020-07-30 Thread Chris Dunlop
.org/archive/html/bug-bash/2017-01/msg00026.html - https://github.com/lvmteam/lvm2/blob/e10f20bc23088a2f9f7529f8f2b40d9c1fcb54c6/tools/lvmcmdline.c#L -- Chris Dunlop

Re: Expand first before asking the question "Display all xxx possibilities?"

2020-08-05 Thread Chris Elvidge
oose for the first expansion? Thanks for the suggestion. -- Chris Elvidge England

Re: Incrementing variable=0 with arithmetic expansion causes Return code = 1

2020-08-28 Thread Chris Elvidge
gendorf Telefon +41 61 417 10 68 Web www.bpm.ch<http://www.bpm.ch/> From man bash: ((expression)) The expression is evaluated according to the rules described below under ARITHMETIC EVALUATION. If the value of the expression is non-zero, the return status is 0; otherwise the return statu

Re: Bad substitution breaks conditional statement

2020-10-12 Thread Chris Elvidge
up to you to check if version X-1 is being used and throw an error there. Isn't that what $BASH_VERSION / $BASH_VERSINFO is for? -- Chris Elvidge England

Re: [ping] declare -c still undocumented.

2020-11-13 Thread Chris Elvidge
t ${var^} still doesn't know that it should apply to the first alpha character in a string. Similar for , and ~. If the first character of the string is a punctuation character, e.g.(, it doesn't work (as I would like it to ). -- Chris Elvidge England

Re: bash doesn't display user-typed characters; can interfere with COPY/PASTE

2020-12-08 Thread Chris Elvidge
eir terminal. Where this can be even more annoying is if your terminal's response to a tab is different than that used on old-hardware terminals. Thanks, -l Try Ctrl-V before hitting . -- Chris Elvidge England

Re: Multiline prompt problems with long commands

2014-11-04 Thread Chris Down
Kamil Neczaj writes: Thank you for your response! I modified this prompt couple of times, probably that's why it's like this. Anyway, I don't think this should cause the problem. The PS1 variable is the one I use. I wanted to copy it here to have exactly the example which I know that causes probl

"fc" builtin exits with unexpected status

2015-11-16 Thread Chris Marusich
he devel", which I presume means the latest development branch of GNU bash. I hope this is enough information to help figure out what the problem is and fix it. Thank you, Chris Marusich

Re: bash incorrectly handles 'echo' + SIGPIPE under some situations on Linux

2016-01-06 Thread Chris Siebenmann
> > If Bash writes to stdout with the built in echo and gets a SIGPIPE, > > it can incorrectly buffer and then repeat this would-have-been output > > in at least $(...) things invoked in a cleanup function and in fact > > in some other contexts as well. To see this in action, create the > > followi

Parallel build error with 4.4-rc1

2016-03-05 Thread Chris Staub
When building Bash 4.4-rc1 with "make -j4", it is possible to get a make error due to the build system attempting to copy a file to a directory before that directory has been created. It will try to copy "Makefile.inc" to $(loadablesdir), but the command to actually create $(loadablesdir) might

POSIX Bug

2016-08-26 Thread Chris Lunniss
[1] 25647 BASH (1) GNU Bash - 3.2 Unfortunately the POSIX site was to quick for me to respond prior to it shutting me out. I raised a question which caused it to do so. I would like to continue the offer if it is still available at all? Kind regards Chris.

Re: whats wrong , exit code 11 on android termux

2024-08-10 Thread Chris Elvidge
l don't believe you, tell them to contact me directly. -Martin Kealey *1: if you suspect that the person is over 70, you'd best avoid their given name entirely, and stick to honorific+surname. Mr/Mrs Firstname is common in the subcontinent - and elsewhere in the middle east. Your prejudices should not warrant a rant. -- Chris Elvidge England

Re: Redirection between assignment statement and command name prevents alias substitution

2021-03-25 Thread Chris F.A. Johnson
I couldn't use a function (which I do for all interactive uses) because that would change $FUNCNAME. -- Chris F.A. Johnson <http://cfajohnson.com/> === Author: === Shell Scripting Recipes: A Problem-Soluti

<    1   2   3   4   5   >