Command substitution optimisation in dot scripts

2016-09-29 Thread Martijn Dekker
I detected an oddity (possible bug) in bash: the usual optimisation for launching external processes in simple command substitutions is turned off while executing a dot script. Background: For reasons that would take too much space to explain here, I need a cross-platform/POSIX way to get the proc

Re: Racing condition leads to unstable exit code

2016-09-29 Thread Luiz Angelo Daros de Luca
No problem! I already workarounded it using pipe as a semaphore. Thanks! It's there any chance of changing the 128+signal exit code for wait when trap is received? It might solve some special usecase which I'm not aware. Wait should always returns exit code related to the child process, except for

Re: Racing condition leads to unstable exit code

2016-09-29 Thread Chet Ramey
On 9/23/16 3:04 PM, Luiz Angelo Daros de Luca wrote: > Hello, > > I'm using 'GNU bash, version 4.3.46(1)-release (x86_64-suse-linux-gnu)' > provided by OpenSUSE Tumbleweed. I recently faced a problem that, depending > on the system load, bash returns different exit codes. I detected that it > is r

Re: Bad substitution when pressing [TAB]

2016-09-29 Thread Chet Ramey
On 9/27/16 4:46 PM, Valentin Bajrami wrote: > HI, > > While I was testing some variable substitution I came across this error / > unwanted behavior. > > So for example: > > $ printf '%s' "${/debash: ${/: bad substitution > bash: ${/: bad substitution > > just after printf '%s' "${/[TAB] this

Re: Verbose error output in interactive mode

2016-09-29 Thread Chet Ramey
On 8/5/16 11:16 AM, John Passaro wrote: > Bash Version: 4.3 > Patch Level: 42 > Release Status: release > > Description: > In an interactive session, when attempting file completion via > when a certain type of ill-formed command substitution is present, bash > gives verbose error output relatin