readline expansion: 'cp $v/' -> 'cp \$v/' (no expansion) - why?

2012-07-05 Thread Jason Vas Dias
my #1 bash gripe is that newer versions do not expand command lines containing '$' in emacs readline editing mode. I used to be able to do: $ export SRC=../somedir $ less ${SRC}/ ( meaning press horizontal tab key ) and emacs mode readline would expand, displaying the contents of ../somedir . Now

Re: readline expansion: 'cp $v/' -> 'cp \$v/' (no expansion) - why?

2012-07-05 Thread Jason Vas Dias
ed to give to enable it? Thanks! On 5 Jul 2012 13:24, "Eric Blake" wrote: > On 07/05/2012 04:58 AM, Jason Vas Dias wrote: > > > Now it changes the input string into > > 'less \$SRC/' and prevents tab expansion > > as would be done without use of any

Re: readline expansion: 'cp $v/' -> 'cp \$v/' (no expansion) - why?

2012-07-07 Thread Jason Vas Dias
tive store variables ? ie. represent them in *environ passed to programs with an integration with glibc "getenv()" to support this ? Thanks & Regards, Jason On Thu, Jul 5, 2012 at 12:59 PM, Jason Vas Dias wrote: > hi Eric - thanks for your response, but bash-4.2.29(2), just built

Re: readline expansion: 'cp $v/' -> 'cp \$v/' (no expansion) - why?

2012-07-08 Thread Jason Vas Dias
On Sun, Jul 8, 2012 at 5:50 PM, Chet Ramey wrote: > On 7/7/12 11:39 AM, Jason Vas Dias wrote: > >> Next Question : >> - any plans to allow us to export array or associative store >> variables ? ie. represent them in *environ passed to programs >> with an i

why must non-standard $IFS members be treated so differently ?

2012-07-29 Thread Jason Vas Dias
Good day Chet, list - I'm concerned about the difference in output of these functions with the example input given on the '$' prefixed line below (with 4.2.29(2)-release (x86_64-unknown-linux-gnu)): function count_args {v=($@); echo ${#v[@]}; } function count_colo

Re: why must non-standard $IFS members be treated so differently ?

2012-07-29 Thread Jason Vas Dias
uldn't it be doing so? Escaping works in filenames, so why not in word-splitting ? Thanks & Regards, Jason On Sun, Jul 29, 2012 at 4:19 PM, Dan Douglas wrote: > On Sunday, July 29, 2012 03:23:29 PM Jason Vas Dias wrote: >> echo $(count_args 1 2 3\ 4) > > I should als

Re: why must non-standard $IFS members be treated so differently ?

2012-07-29 Thread Jason Vas Dias
of escaping not being enabled during word-splitting not documented anywhere ? Thanks & Regards, Jason On Sun, Jul 29, 2012 at 9:05 PM, Andreas Schwab wrote: > Jason Vas Dias writes: > >> Thanks Dan - >> The plot thickens - Yes, you're right, I had $IFS mistakenly se

bash-4.2(42) on AIX 6.1 has broken command expansion in double-quoted strings

2013-02-27 Thread Jason Vas Dias
point . Does anyone know if there is a way to disable this ? Thanks in advance for any response - Best Regards, Jason Vas Dias

unhelpful effect of '!' prefix on commands in conditionals - a bug ?

2014-06-13 Thread Jason Vas Dias
Having defined a function _F to return a non-zero return status : $ function _F () { return 255; } I'd expect to be able to test this return status in an if clause - but this is what happens: $ if ! _F ; then echo '_F returned: '$?; fi _F returned: 0 whereas if I just run F inline, the return

'declare' does not honor '-e' in command substituted assignments - a bug ?

2014-08-09 Thread Jason Vas Dias
Good day bash list - I don't understand why this emits any output : $ ( set -e; declare v=$(false); echo 'Should not get here'; ) Should not get here $ While this does not: $ ( set -e; v=$(false); echo 'Should not get here'; ) $ Shouldn't declare / typeset behave like the normal variab

need ability to tell if array is associative or not - bug?

2014-08-29 Thread Jason Vas Dias
Good day list - There seems to be no way of testing if an array variable is associative or not , yet attempting to make associative assigments to a normal array results in a syntax error . I have something like: declare -xr TYPE_ARRAY=0 TYPE_ASSOC=1 function f() { declare -n an_arra

Re: need ability to tell if array is associative or not - bug?

2014-08-29 Thread Jason Vas Dias
ciative array, as declare -F does for functions ? Or is there some way to test if a variable is an associative array or not? Thanks & Regards, Jason On 8/29/14, Jason Vas Dias wrote: > Good day list - > > There seems to be no way of testing if an array variable is associative or >

Re: need ability to tell if array is associative or not - bug?

2014-08-29 Thread Jason Vas Dias
-x; f my_array ) + f my_array + local an_array=my_array + local value=1.0 + local v=1.0 + local 'ev=['\''value'\'']='\''1.0'\''' + eval 'my_array=(['\''value'\'']='\''1.0'\

Re: need ability to tell if array is associative or not - bug?

2014-08-29 Thread Jason Vas Dias
tion f() { local an_array=$1; local value='1.0'; local ev='['"'"'value'"'"']='"'""$value""'"; eval ${an_array}='('"$ev"')'; }; declare -A my_array;

Re: Bash-4.3 Official Patch 25

2014-09-25 Thread Jason Vas Dias
Good day Chet, bash-list - I just checked out the latest git head, applied the bash43-025 patch, and built $ ./bash --version GNU bash, version 4.3.25(3)-release (x86_64-unknown-linux-gnu) ... which PASSED its 'make check' test suite, both under Ubuntu 14.04.1 LTS and under RHEL-6.5+ , on an x

Re: Bash-4.3 Official Patch 25

2014-09-25 Thread Jason Vas Dias
27;, so was trying to stty on stdin, which was the list file. Sorry, my mistake - a nasty coincindence that it was the first thing I tried with the new bash version. Regards, Jason On 9/25/14, Jason Vas Dias wrote: > Good day Chet, bash-list - > > I just checked out the latest git hea

test '-v' - associative vs. normal array discrepancy - a bug ?

2014-11-19 Thread Jason Vas Dias
Good day - Please could anyone explain why the first command below produces no output: $ ( declare -A a=([a]=1); if [ -v a ]; then echo yes; fi ) $ ( declare -a a=([0]=1); if [ -v a ]; then echo yes; fi ) yes $ There does not appear to be any documentation about different behaviour of -v for as

Re: test '-v' - associative vs. normal array discrepancy - a bug ?

2014-11-19 Thread Jason Vas Dias
Thanks to all who replied. I would really like -v to do as it documented to do : " -v True if the shell variable varname is set (has been assigned a value) " To me, the fact that -v does not return true if the variable is an array and does not have element 0 - or element '0' in the case of asso

bash 5.0.2(1) multiline command in history bug

2019-02-04 Thread Jason Vas Dias
ically without user initiation of command editing. Can either of these new behaviors be disabled in bash 5.0.2 ? Thanks & Best Regards, Jason Vas Dias

Re: bash 5.0.2(1) multiline command in history bug

2019-02-05 Thread Jason Vas Dias
t readline, which could be something to do with it. Thanks & Best Regards, Jason On 04/02/2019, Chet Ramey wrote: > On 2/4/19 3:22 AM, Jason Vas Dias wrote: >> Good day - >> >> Under bash 4.4.23, with emacs history editing enabled, I can do: >>$ echo &#x

[contrib]: setpgrp + killpg builtins

2015-01-31 Thread Jason Vas Dias
Dear bash developers - It is very difficult to overcome the problems caused by the scenario described within this email without something the enclosed "setpgrp " and "killpg " bash loadable builtins . Without them, or options to change signal handling for simple commands, it is too easy to cre

bash-4.3.33 regexp bug

2015-03-05 Thread Jason Vas Dias
Good day list, Chet - I think this is a bug: ( set -x ; tab=$'\011'; s="some text: 1.2.3"; if [[ "$s" =~ ^some text:[\ $tab]+([0-9.]+) ]]; then echo "${BASH_REMATCH[1]}"; fi ) -bash: syntax error in conditional expression -bash: syntax error near `$tab]+([0-9.]+)' Do you agree ? If not,

4.3.42 : shopt -s lastpipe & "no record of process" warnings

2016-06-05 Thread Jason Vas Dias
With a build of bash 4.3 patchlevel 42 on a Linux x86_64 system I am getting warning messages on stderr when running a certain script like: "wait_for: no record of process 8278" . Running bash with the script as input under strace shows that process 8277 does a successful wait4(-1,...) which DOE

Re: 4.3.42 : shopt -s lastpipe & "no record of process" warnings

2016-06-05 Thread Jason Vas Dias
emits the message: "xxx.sh: line 46: No record of process 8278" . Line 46 in my script consist of function f() . This seems buggy to me - I'll try developing a patch to fix it and will post back here. Regards, Jason On 05/06/2016, Jason Vas Dias wrote: > With a build of bash 4.

Re: 4.3.42 : shopt -s lastpipe & "no record of process" warnings

2016-06-05 Thread Jason Vas Dias
patch file or in the forthcoming bash-4.4 release ? I think it should, as it is rather unfair of bash to make its internal bookkeeping errors appear as if they could be user programming errors. Regards, Jason On 05/06/2016, Jason Vas Dias wrote: > The strace log shows that process 8277 is th

q// / qq// syntax or built-ins please ?

2017-03-23 Thread Jason Vas Dias
Please , in some future versions of bash, could it provide support / help for avoiding "quoting hell", in such situations as : $ echo " Error: Cannot find file '/missing/file_1'. Error: Cannot find file '/missing/file_2'. " | while read line; do cmd='if [[ '$'"'"$line"$'"'' =~ ^[^'"\\'"']*