Re: gnu parallel in the bash manual

2013-02-16 Thread Chris Down
On 16 February 2013 20:54, John Kearney wrote: > Am 16.02.2013 09:50, schrieb Pierre Gaston: > > I don't quite see the point of having gnu parallel discussed in the > > bash reference manual. > > http://www.gnu.org/software/bash/manual/bashref.html#GNU-Parallel > > I don't argue that it can be a

Re: Bash stating it is in a directory which does not exist

2013-02-19 Thread Chris Down
This is to do with the way Linux handles open file descriptors. It is not a bug in bash, it is expected (and anticipated) behaviour. Chris On 19 February 2013 14:00, Nikolas Kallis wrote: > Hello, > > > > I have found a bug in Bash: > > /opt/foobar$ > /opt/foobar$ rmdir ../foobar/ > /opt/foobar

Re: Bash stating it is in a directory which does not exist

2013-02-19 Thread Chris Down
Hi, Please don't break threads by replying to individuals, it destroys the flow of conversation :-) I completely disagree that this would be an improvement to bash. It goes against convention and the principle of least astonishment. It is very un-Unix. Chris On 19 February 2013 22:56, Nikolas K

Re: Bash stating it is in a directory which does not exist

2013-02-19 Thread Chris Down
On 20 February 2013 01:20, Nikolas Kallis wrote: > Please don't break threads by replying to individuals, it destroys the flow > >> of conversation :-) >> > > What do you mean? You just did it again. You're replying to my e-mail address and *not* the general list. Please don't do that. > I co

cd -e returns syntax error

2013-02-23 Thread Chris Down
Hi all, Unless I'm misunderstanding how it should work, `cd -P -e' does not work as specified by the documentation. From `help cd': -e if the -P option is supplied, and the current working directory cannot be determined successfully, exit with a non-zero status Attempting to use it,

Re: cd -e returns syntax error

2013-02-23 Thread Chris Down
Never mind, I found another thread about the same issue. Best, Chris

Re: "The \". ~/.bash_aliases\" on bashrc don't load file"

2013-02-25 Thread Chris Down
On 2013-02-25 21:27, Uroz Gonzalez, Jose Luis wrote: > 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'

Re: "RE:Re: \"The \\\". ~/.bash_aliases\\\" on bashrc don't load file\""

2013-02-25 Thread Chris Down
On 2013-02-26 01:17, Uroz Gonzalez, Jose Luis wrote: > Hi Chris, > > The output is: > > es un alias de `cd ~' ( . is an alias of "cd ~") > > My apologies. > > Some days ago I tested aliases to best use and tested this, but not deleted. > On restarting system I forgot completely. Sorry. > > From no

Re: cd -e returns syntax error

2013-02-25 Thread Chris Down
Hey, On 2013-02-24 00:54, Dan Douglas wrote: > On Sunday, February 24, 2013 02:43:03 PM Chris Down wrote: > > Hi all, > > > > Unless I'm misunderstanding how it should work, `cd -P -e' does not work as > > specified by the documentation. From `help cd':

Re: Should this be this way?

2013-02-25 Thread Chris Down
On 2013-02-25 18:27, Linda Walsh wrote: > I mentioned that everything in my ENV and usage pointed at /bin/bash. You gave $SHELL, which is not really relevant (it doesn't necessarily reference your login shell, or your current shell either). > Why would I do that, and then use 'sh script'? > > Wou

Re: Should this be this way?

2013-02-27 Thread Chris Down
On 2013-02-27 20:05, Linda Walsh wrote: > (maybe distro's shouldn't muck w/user's shells...)... You're using SuSE, which is basically guaranteeing that your programs are mangled in unexpected ways. Then again, it's as bad of an offender as Debian, and most other distributions, I guess... Chris

Re: PATCH: compile Bash 4.2 with DJGPP

2013-03-02 Thread Chris Down
Your patch appears to be mangled with carriage returns. On 2 March 2013 21:52, Fabrizio Gennari wrote: > Hello, > with this patch I successfully compiled Bash 4.2 using a DJGPP > cross-compiler running under Linux (Ubuntu 12.10). May this be applied? > > Regards, > Fabrizio

Re: PATCH: compile Bash 4.2 with DJGPP

2013-03-02 Thread Chris Down
> are no carriage returns, only newlines > > Il 02/03/2013 15:17, Chris Down ha scritto: > >> Your patch appears to be mangled with carriage returns. >> >> On 2 March 2013 21:52, Fabrizio Gennari wrote: >>> >>> Hello, >>> with this patch I

Re: ignoring current shell and always running posix shell? Re: Should this be this way?

2013-03-13 Thread Chris Down
On 14 March 2013 14:52, Linda Walsh wrote: > Is 'rbash' not part of POSIX? I think you misunderstand what POSIX Is. bash in general is not "part of POSIX", neither is any other shell (other than the POSIX shell, which is purely theoretical). It has POSIX compliant features when run in POSIX compl

Re: If rbash is worthless, why not remove it and decrease bloat?

2013-03-16 Thread Chris Down
On 2013-03-16 12:13, Chet Ramey wrote: > > If it cannot be removed, then some people are using it with the false > > expectation that it provides some increased security. Better to get > > rid of that than have someone think it is worth the extra bytes it takes > > to implement. > > Folks cling ti

Re: If rbash is worthless, why not remove it and decrease bloat?

2013-03-16 Thread Chris Down
On 2013-03-16 23:06, Pierre Gaston wrote: > On Sat, Mar 16, 2013 at 6:28 PM, Chris Down wrote: > > On 2013-03-16 12:13, Chet Ramey wrote: > >> > If it cannot be removed, then some people are using it with the false > >> > expectation that it provides some i

Re: Bug/limitation in 'time'

2013-03-16 Thread Chris Down
Hi Bruce, On 2013-03-16 17:41, Bruce Dawson wrote: > I think it's important because when I hit this problem (using $(expr) for > looping in shell scripts is slow) I initially assumed that my task was not > CPU bound, because that is what 'time' told me. This then led me down the > wrong path in my

Re: Bug/limitation in 'time'

2013-03-16 Thread Chris Down
On 2013-03-16 19:33, Bruce Dawson wrote: > Thanks -- good to know that there is a fast and POSIX compliant method of > doing this. I should have included my optimized counting loop -- it's what > we switched to when we realized that $(expr) was a problem. Here it is now: > > # This code performs qu

Re: Bug/limitation in 'time'

2013-03-16 Thread Chris Down
On 2013-03-16 19:18, Bruce Dawson wrote: > Yep, we've changed our loops to use roughly that syntax. Unfortunately a lot > of online resources recommend the $(expr) technique. Unfortunately most online resources on bash are terrible. The only ones I can recommend outside of the official documentati

Re: Bug/limitation in 'time'

2013-03-16 Thread Chris Down
On 2013-03-17 01:09, William Park wrote: > Are you saying that > > for (( ; ; )) > > is not POSIX? `((' is not POSIX. pgpstbEnn7hm4.pgp Description: PGP signature

Re: Bug/limitation in 'time'

2013-03-18 Thread Chris Down
On 2013-03-18 00:46, Linda Walsh wrote: > Bruce Dawson wrote: > > Chris Down pointed that out. My loop now looks like this -- portable (I > > believe) and fast: > > > > BashCount() { > > for (( i = $1 ; i > 0 ; i-- )); do > > : > >

Re: bug-report/request: allow "set +n" to re-enable commands.

2013-03-22 Thread Chris Down
For 1, use a heredoc to a noop. Sorry for the terse reply, on my phone. On 23 Mar 2013 05:07, "Richard Neill" wrote: > Dear All, > > Might I suggest/request that "set +n" should undo the effect of > "set -n" ? > > For example: > > #!/bin/bash > echo one > set -n >

Re: Local variables overriding global constants

2013-04-03 Thread Chris Down
On 2013-04-03 10:50, Nikolai Kondrashov wrote: > On 04/03/2013 10:43 AM, Chris F.A. Johnson wrote: > >On Wed, 3 Apr 2013, Nikolai Kondrashov wrote: > >>I.e. this: > >> > >>bash -c 'declare -r v; a() { declare -r v; }; a' > >> > >>Results in: > >> > >>bash: line 0: declare: v: readonly variable > >

Re: Local variables overriding global constants

2013-04-03 Thread Chris Down
On 2013-04-03 11:00, Nikolai Kondrashov wrote: > >>>It doesn't work because you are trying to redefine an existing > >>>readonly variable. > >> > >>Yes, but I'm explicitly redefining it locally, only for this function. > >>And this works for variables previously defined in the calling function. > >

Re: to - Bookmark file system locations in bash on POSIX-like systems

2013-04-04 Thread Chris Down
Hi Mara, On 2013-04-03 17:08, Mara Kim wrote: > I thought you guys might enjoy this simple tool I wrote. It's under GPL so > use it, hack it, fork it, ignore it, etc. I'm sorry that the first reply has to be criticism, but since you posted it on a mailing list, I guess you're looking for feedbac

Re: to - Bookmark file system locations in bash on POSIX-like systems

2013-04-04 Thread Chris Down
Hi Mara, On 2013-04-04 03:58, Mara Kim wrote: > What is do you mean specifically by function vs [? Do you mean parens? Is > function a bash-ism? function is a bashism, yes. You can just omit it and your function declarations magically become POSIX. > I am really only enthusiastic about the int

Re: invoke tilde expansion on quoted string

2013-04-04 Thread Chris Down
On 2013-04-04 07:11, Eric Blake wrote: > Given that the topic of tilde-completion has recently come up (again), I > wanted to point out: Perhaps my reply here[1] can help out. Only looked briefly, but it seems it could at least eliminate the calls to eval (although it doesn't support some more rar

Re: to - Bookmark file system locations in bash on POSIX-like systems

2013-04-04 Thread Chris Down
On 2013-04-04 21:05, Domingo Ignacio Galdos wrote: > Hn, I use a similar tool called ln > > In all seriousness what value does or could a tool like this add above ln? > > ln -s ~/some/long/path ~/bookmark > cd ~/bookmark > cd ~/bookmark/nested/tab/completion > rm ~/bookmark > > Sorry I don't mean t

Re: to - Bookmark file system locations in bash on POSIX-like systems

2013-04-05 Thread Chris Down
On 2013-04-04 20:51, Mara Kim wrote: > To get back on track. Note that this process is the same even if the 'work' > bookmark already exists, while doing things by hand would throw an error > without first removing the old link. See the `-f' option to ln. > Also you would need to remember to use

Re: to - Bookmark file system locations in bash on POSIX-like systems

2013-04-05 Thread Chris Down
On 6 Apr 2013 01:49, "Mara Kim" wrote: > > > See the `-f' option to ln. > > So I did some experimentation, and it is not sufficient to simply use the -f option to ln to update bookmarks > $ ln -s /bin foo > # foo -> /bin/ > $ ln -sf /etc foo > ln: failed to create symbolic link `rot/etc': Permissi

Re: Interpretation of escapes in expansions in pattern matching contexts

2013-04-06 Thread Chris Down
On 2013-04-06 07:01, Eric Blake wrote: > > bb: no > > jsh: no > > I haven't heard of these two, but they are also bugs. I assume bb is busybox ash. Chris pgppwY6f9jNaE.pgp Description: PGP signature

Re: Found problem mentioned in email 3/27: path interpretted/eval'd as numeric expression

2013-04-17 Thread Chris Down
On 2013-04-17 17:30, Linda Walsh wrote: > BTW, is it planned to implement exporting ARRAY and HASHES? > > Sure would simplify some programs... ;-) As if exporting functions wasn't hacky enough... pgpgq8C_hz5oQ.pgp Description: PGP signature

Re: getting weird output out of 'echo' w/args

2013-05-30 Thread Chris Down
Pierre is referring to the fact that [i++] is evaluated as a glob by the shell, the reason it doesn't work is because $i is postincremented instead of preincremented. You can see what he means here: $ shopt -u nullglob $ i=0 $ while read a[++i]; do > echo "${a[i]}" > done <<< hello hello $ sho

Re: getting weird output out of 'echo' w/args

2013-05-30 Thread Chris Down
That's... why I said he was unintentionally doing postincrement... On 30 May 2013 17:04, Davide Brini wrote: > On Thu, 30 May 2013 16:56:36 +0800, Chris Down wrote: > >> Pierre is referring to the fact that [i++] is evaluated as a glob by >> the shell, the reason it doe

Re: getting weird output out of 'echo' w/args

2013-05-30 Thread Chris Down
On 30 May 2013 17:59, Linda Walsh wrote: > Generally don't feel good about that op except in very narrow > circumstances...for exactly those types of reasons...what you > can't see CAN hurt you! ;-) It doesn't have anything to do with the operator, it's to do with the usage of square brackets t

Re: currently doable? Indirect notation used w/a hash

2013-06-10 Thread Chris Down
Enjoy your arbitrary command execution. On 10 Jun 2013 14:15, "Chris F.A. Johnson" wrote: > On Mon, 10 Jun 2013, Greg Wooledge wrote: > > On Sun, Jun 09, 2013 at 02:02:02PM -0700, Linda Walsh wrote: >> >>> I was wondering if I was missing some syntax somewhere... >>> but I wanted to be able to p

Re: currently doable? Indirect notation used w/a hash

2013-06-11 Thread Chris Down
On 11 Jun 2013 02:19, "Mike Frysinger" wrote: > > On Monday 10 June 2013 18:20:44 Chris F.A. Johnson wrote: > > On Mon, 10 Jun 2013, Linda Walsh wrote: > > >> Point taken, but the only way such a string would be passed as a > > >> variable name is if it was given as user input -- which would,

Re: bug batch

2013-06-13 Thread Chris Down
On 13 Jun 2013 11:00, "Linda Walsh" wrote: > If you do it without the ':', it returns a false status. > The colon doesn't seems to return true or false based on whether or not > there was a syntactic error, but not for a command that runs normally and returns > any status. : is just a noo

Re: currently doable? Indirect notation used w/a hash

2013-06-14 Thread Chris Down
On 14 Jun 2013 00:57, "Linda Walsh" wrote: > > > > Chet Ramey wrote: >>> >>> Now I want to access the value for IP for the current "IF" (IF holding >>> eth0 or eth1 or some other InterFace name). >> >> >> This is an excellent statement of the rationale for nameref variables, >> which will be imple

Re: currently doable? Indirect notation used w/a hash

2013-06-14 Thread Chris Down
On 14 Jun 2013 10:21, "Linda Walsh" wrote: >> Please, no more brittle export hacks. I'm already crying enough at function exports. > > > Brittle would be bad. Pliant and chewy would be much better, I agree. > > Perhaps you might explain what you mean by brittle? Like the export hacks > you get i

Re: `printf -v foo ""` does not set foo=

2013-06-16 Thread Chris Down
On 17 June 2013 13:27, Mike Frysinger wrote: > simple test code: > unset foo > printf -v foo "" > echo ${foo+set} > > that does not display "set". seems to have been this way since the feature > was added in bash-3.1. Interesting. It also won't change it if it already exi

Re: regex confusion -- not matching; think it should?

2013-06-19 Thread Chris Down
On 20 June 2013 00:29, DJ Mills wrote: > wordsplitting and pathname expansion do not occur within the > [[ keyword. $ > foo $ [[ foo == * ]] && echo bar bar

Re: regex confusion -- not matching; think it should?

2013-06-19 Thread Chris Down
On 20 June 2013 00:43, Greg Wooledge wrote: > On Thu, Jun 20, 2013 at 12:39:56AM +0800, Chris Down wrote: >> On 20 June 2013 00:29, DJ Mills wrote: >> > wordsplitting and pathname expansion do not occur within the >> > [[ keyword. >> >> $ > foo >>

Re: Bug report command "cd"

2013-07-03 Thread Chris Down
Greetings. On 3 July 2013 17:52, Stephan van Ingen wrote: > stephanbosal@in-laptop3:~/Downloads/Win8$ *cd --SMSBOOT-sources-/* > bash: cd: --: invalid option > cd: usage: cd [-L|[-P [-e]]] [dir] > stephanbosal@in-laptop3:~/Downloads/Win8$ *cd \-\-SMSBOOT-sources-/* > bash: cd: --: invalid option

Re: Bug report command "cd"

2013-07-03 Thread Chris Down
On 4 July 2013 00:08, Chris Down wrote: > Greetings. > > On 3 July 2013 17:52, Stephan van Ingen wrote: >> stephanbosal@in-laptop3:~/Downloads/Win8$ *cd --SMSBOOT-sources-/* >> bash: cd: --: invalid option >> cd: usage: cd [-L|[-P [-e]]] [dir] >> stephanbosal

Re: PS1 multiline with colors

2013-07-04 Thread Chris Down
> Repeat-By: > With mintty terminal: > PS1='\h Hello everybody\n\e[1;35m\]Hi\e[0m\]>' > << cursor up >> > << cursor down >> > the line look like: > Hi>PS1='\h Hello > > With putty terminal (with default configuration): > with the same

Re: Chained command prints password in Clear Text and breaks BASH Session until logout

2013-07-11 Thread Chris Down
On 12 Jul 2013 01:29, "Chris Down" wrote: > What does this have to do with bash? This is almost certainly an issue with your terminal it MySQL client. What about this would constitute a bash bug? s/\bit\b/or/

Re: Chained command prints password in Clear Text and breaks BASH Session until logout

2013-07-11 Thread Chris Down
On 12 Jul 2013 01:25, "Jason Sipula" wrote: > > 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-redhat-linux-gn

Re: Error in read implementation and/or documentation

2013-07-27 Thread Chris Down
Hello, On 27 July 2013 06:37, Peter Olson wrote: > If read is invoked with the -n or -N options, then given an EOF, it returns > with a zero exit status. Cannot reproduce. $ echo $BASH_VERSION 4.2.45(2)-release $ read -n1 In addition, if it is invoked with -n 3, for example, then g

Re: Error in read implementation and/or documentation

2013-07-27 Thread Chris Down
On 27 July 2013 19:32, Andreas Schwab wrote: > Chris Down writes: >> Cannot reproduce. >> >> $ printf 01 | read -n3 >> $ echo $? >> 1 > > Try the same with input from the terminal. Hm, that's a whole other problem then. I can reproduce this by following that path.

Re: Error in read implementation and/or documentation

2013-07-27 Thread Chris Down
On 27 July 2013 17:17, Pierre Gaston wrote: > What is your test case? > I don't seem to be able to reproduce your problems, read returns > when it encouters EOF, and I get 1 if fewer bytes are read It seems it is something like this: $ read -n3 12^D$ echo $? 0

Re: Bug in function return statement in while subshell

2013-07-29 Thread Chris Down
On 29 Jul 2013 17:00, "Roman Rakus" wrote: > > I didn't take a look on where the problem could be, but it is discussed on stackoverflow [1]. > > Looks like return builtin falsely exit execution of while loop instead of function. Unless I'm reading this wrongly, this seems like expected behaviour

Re: Bug in function return statement in while subshell

2013-07-30 Thread Chris Down
On 2013-07-30 12:11, Pierre Gaston wrote: > what about things like this: foo () ( return 1; ) Except in this case, the return has a valid context. I don't see how it's really comparable to the represented case. pgpeaKMNUypTl.pgp Description: PGP signature

Re: Bug in function return statement in while subshell

2013-07-30 Thread Chris Down
On 2013-07-29 17:05, Chris Down wrote: > On 29 Jul 2013 17:00, "Roman Rakus" wrote: > > > > I didn't take a look on where the problem could be, but it is discussed > on stackoverflow [1]. > > > > Looks like return builtin falsely exit execution of whi

Re: Bug in function return statement in while subshell

2013-07-30 Thread Chris Down
On 2013-07-30 12:45, Pierre Gaston wrote: > On Tue, Jul 30, 2013 at 12:29 PM, Chris Down wrote: > > On 2013-07-30 12:11, Pierre Gaston wrote: > >> what about things like this: foo () ( return 1; ) > > > > Except in this case, the return has a valid context. I

Re: Bug in function return statement in while subshell

2013-07-30 Thread Chris Down
On 2013-07-30 13:15, Pierre Gaston wrote: > There are 2 loop levels in my example, but break only exit the subshell. Yes, that's what I was saying. I think this should only exit the subshell (although I'd like to see break and its family returning errors when you are trying to operate on more loop

Re: Bug in function return statement in while subshell

2013-07-30 Thread Chris Down
On 2013-07-30 10:18, Greg Wooledge wrote: > After the fork() which creates the subshell, each of the two processes > (parent and child) is still within its own instance of the function. > The "return" command executed in the child causes the child's function > to terminate, but this does not cause

Misleading phrasing about $! in documentation

2013-07-31 Thread Chris Down
I think our documentation on $! is a little misleading. `man bash' states: Special Parameters The shell treats several parameters specially. These parameters may only be referenced; assignment to them is not allowed. [...] ! Expands to the process ID of the mo

Following symlinks in globstar

2013-08-01 Thread Chris Down
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 compatibility) following symlinks? This can be quite irritating when trying to traverse

Re: Misleading phrasing about $! in documentation

2013-08-01 Thread Chris Down
On 2013-08-01 11:37, Chet Ramey wrote: > How about the command (or job) most recently placed in the background. That works for me. I'd be more inclined to use "job" since it avoids confusion about what happens when backgrounding a pipeline. Thanks. pgp2RdgUre66e.pgp Description: PGP signature

Re: Arithmetic assignment side-effects

2013-08-04 Thread Chris Down
On 2013-08-03 17:04, Dan Douglas wrote: > Is it specified what the value of x should be after this expression? > > x=0; : $((x+=x=1)) I don't know if it is specified in a standard (I suspect it may be undefined), but it looks pretty clear to me that the answer should be 2. Has anyone proposed logi

Re: Arithmetic assignment side-effects

2013-08-04 Thread Chris Down
On 2013-08-04 22:41, Andreas Schwab wrote: > x+=a is the same as x=x+a. In most cases I'd agree, in this case I think it changes the logic when considering += as an atomic increment (which, of course, += isn't, but aesthetically it presents itself as such) as opposed to two separate operations. >

Re: Bash gives error string splice

2013-08-08 Thread Chris Down
On 8 Aug 2013 23:18, "Williams, Zak" wrote: > Repeat-By: >Replicating the code I have below. You will then want to call this script via the bottom of the .bashrc file ( sh [path to script here] ). This is not a bash bug, nor is it a bug at all, because sh is not bash. On your syst

Re: possible bash bug - 'history'

2013-08-10 Thread Chris Down
On 2013-08-09 16:10, Chet Ramey wrote: > So is there enough of a need to make 0 do something different? Or does > $BASH_COMMAND suffice? (I suspect the answer to that question is "no", > because it deals with commands rather than input lines.) I agree, for this case I don't think $BASH_COMMAND su

Re: bash error

2013-08-16 Thread Chris Down
On 2013-08-16 06:07, Anand, Kuldip wrote: > I have installed cygwin in windows 2008 R2(cgysnap29503) server and when I am > trying to ssh using s_tibco account I am getting error :-- > > 104 ls1238p.encana.com:/home/kanand99 % ssh > s_tibco@cgysnap29503 > s_tibco@cgys

Re: i++ cause bad return code when result is 1

2013-08-18 Thread Chris Down
On 2013-08-18 16:57, David Lehmann wrote: > The ((i++)) fails only when the result is 1. When the result is 0 or 2, it > does not fail. This is a problem when 'set -e'. This is normal and expected. If the value returned in an (( expression is zero, then the exit code is 1. Since you're using a p

Re: child_pid of background process? (not in manpage?)

2013-08-18 Thread Chris Down
On 2013-08-18 17:46, Linda Walsh wrote: > I don't find the variable for the process ID of the > last started background process documented in the bash manpage... > > Am I just missing it, or did it get left out by accident or > where did it go? First of all, it would help if you gave your version.

Re: child_pid of background process? (not in manpage?)

2013-08-19 Thread Chris Down
On 2013-08-19 07:42, Greg Wooledge wrote: > A long time ago I submitted a patch that would change all of these to > include their $ so that people could SEARCH for them and FIND them, > but the patch was not accepted. I support this patch. pgptg7YdQPdN5.pgp Description: PGP signature

Re: feature request: file_not_found_handle()

2013-08-21 Thread Chris Down
On 2013-08-20 18:47, Linda Walsh wrote: > If it wasn't for things doing what we don't expect, many things wouldn't be > around (aspirin, popcorn, digitalis, Rogain, & tons more... most things are > found by NOT using them they way you are directed to use them). This is such a poor analogy that I d

Re: feature request: file_not_found_handle()

2013-08-21 Thread Chris Down
On 2013-08-21 13:12, Ken Irving wrote: > Yes I do have some idea. I read the bash-bug list regularly, and many > times (even if you can't tell) refer to the wiki you host, read the FAQs, > RTFMs, try to absorb what wisdom I can, and in general try to improve on > the bash coding I do use. But thi

Re: Subscribe

2013-08-24 Thread Chris Down
On 2013-08-24 07:21, Michael Harris wrote: > Sincerely, > > > > Michael B. Harris > > Kc9cmt,Recording Secretary, MRAC > > Linux User #1063 > > 42.922241,-87.880583 > > (Unimatrix Zero) > > > > Linux Penguins > > > http://s0.cyberciti.or

Re: i++ cause bad return code when result is 1

2013-08-26 Thread Chris Down
On 2013-08-26 21:36, David Lehmann wrote: > My issue is that the resulting behavior in Exercise 1 does not make sense. > > The resulting value of i should have no bearing on the exit code. If the > addition succeeded, the expression should return 0 (success). If i was not > an integer (e.g. i=he

Re: failed grep should cause subshell to exit

2013-08-26 Thread Chris Down
On 2013-08-26 21:41, David Lehmann wrote: > I expected the '!' to reverse the exit code, such that if the grep return 0 > (success), the expression would return 1 (failure); if the grep returned > non-zero (failure), the expression would return 0 (success). i.e. I > expected the '!' to behave lik

Re: failed grep should cause subshell to exit

2013-08-26 Thread Chris Down
On 2013-08-27 03:48, Chris Down wrote: > It does -- like Andreas said, it just makes it immune to `set -e'. > > $ set -e > $ > file > $ ! grep foo file > $ echo $? > 0 Or, perhaps more closely matching your case: $ set -e $ echo foo

Re: i++ cause bad return code when result is 1

2013-08-26 Thread Chris Down
On 2013-08-26 22:06, Chris F.A. Johnson wrote: > Rather, that it is != 0 Er, yes. That's what I get for writing messages at 4am! pgp7Icwgcq_MV.pgp Description: PGP signature

Re: Failglob issues

2013-09-01 Thread Chris Down
On 2013-09-01 12:45, Nikolai Kondrashov wrote: > 1) With both nullglob and failglob enabled it is considered an error for a >glob not to match anything. I'd say it's more natural to not produce an >error in this case. Otherwise a fairly useful behavior is broken, like >glob use in "for"

Re: multi-line like C-style comments ( /* code */ ) in bash

2013-09-07 Thread Chris Down
On 2013-09-07 20:05, Edik Bondarenko wrote: > I am added function `discard_multiline_comments` which disables code > between /* and */ (C-style comments). > The body of the function is located in the file y.tab.c : 5140 . > Can this functionality be added in the next release ? Please look into how

Re: bash built-ins `true' and `false' undocumented

2013-09-27 Thread Chris Down
On 2013-09-27 20:19, Roland Winkler wrote: > Yet I think that the info pages are supposed to provide the definitive > information about GNU software. So I still believe that it would be > useful to list these builtins in the info pages, too. Certainly, > the info pages are more useful for getting

Re: Bash 4.2 completion fails with failglob option enabled

2013-10-04 Thread Chris Down
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 that could return empty globs. pgpS0076Al6m7.pgp Description: PGP signature

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

  1   2   >