Re: Changing the way bash expands associative array subscripts

2021-03-15 Thread Lawrence Velázquez
> On Mar 15, 2021, at 9:03 PM, Léa Gris wrote: > > Please excuse my profanity of mentioning zsh in this list, but I really think > features and behavior convergence can benefit end users in multiple ways, > especially when expanding beyond the POSIX sh scope. > > What direction has taken zsh w

Re: Changing the way bash expands associative array subscripts

2021-03-15 Thread Koichi Murase
2021年3月16日(火) 8:12 Chet Ramey : > key='x],b[$(echo uname >&2)' > (( assoc[$key]++ )) > [...] > declare -A assoc=(["x],b[\$(echo uname >&2)"]="1" ) I agree with this change. I think the same rule should apply also to the indexed arrays in the arithmetic command. With `index='0],b[1'; ((array[$index

Re: Changing the way bash expands associative array subscripts

2021-03-15 Thread Léa Gris
Le 16/03/2021 à 01:12, Chet Ramey écrivait : What do folks think? Please excuse my profanity of mentioning zsh in this list, but I really think features and behavior convergence can benefit end users in multiple ways, especially when expanding beyond the POSIX sh scope. What direction has

Re: Changing the way bash expands associative array subscripts

2021-03-15 Thread L A Walsh
On 2021/03/15 17:12, Chet Ramey wrote: I'm kicking around a change This means that, given the following script, declare -A a key='$(echo foo)' a[$key]=1 a['$key']=2 a["foo"]=3 What do folks think? --- Looks like a flexible way to deal with some of the side effects of the double-dequotin

Changing the way bash expands associative array subscripts

2021-03-15 Thread Chet Ramey
I'm kicking around a change to associative array subscript expansion that would basically force the equivalent of `assoc_expand_once' on all the time, with additional changes to prevent unwanted double expansion in an arithmetic expression context. The option would still exist, and still be settab

Re: Tab completion results in "unexpected EOF" error and crash

2021-03-15 Thread Chet Ramey
On 3/15/21 6:56 AM, Xu Lu wrote: Bash Version: 5.1 Patch Level: 4 Release Status: release Description: I was typing a command and want to use to complete a program name after the following code: tig -C "$(dirname "$(base but bash shows me a "bash: unexpected EO

Re: [Patch] .gitignore TAGS and tags

2021-03-15 Thread Mike Jonkmans
On Mon, Mar 15, 2021 at 04:06:06PM -0500, Eric Blake wrote: > But even if the upstream repo doesn't want to ignore a file in the > (checked-in) .gitignore, you can always edit your (local-only) > .git/info/exclude to exclude your extra files locally. Thanks Eric, that is useful. Regards, Mike Jon

Re: [Patch] .gitignore TAGS and tags

2021-03-15 Thread Eric Blake
On 3/15/21 3:42 PM, Chet Ramey wrote: > On 3/15/21 3:57 PM, Mike Jonkmans wrote: >> On Mon, Mar 15, 2021 at 11:23:46AM -0400, Chet Ramey wrote: >>> On 3/15/21 3:29 AM, Mike Jonkmans wrote: I assume that the TAGS and tags files will not go into the repo. >>> >>> Why not? This is only the devel

Re: [Patch] .gitignore TAGS and tags

2021-03-15 Thread Chet Ramey
On 3/15/21 3:57 PM, Mike Jonkmans wrote: On Mon, Mar 15, 2021 at 11:23:46AM -0400, Chet Ramey wrote: On 3/15/21 3:29 AM, Mike Jonkmans wrote: I assume that the TAGS and tags files will not go into the repo. Why not? This is only the devel branch; they don't go into releases. Adding tags/TAG

Re: [Patch] .gitignore TAGS and tags

2021-03-15 Thread Mike Jonkmans
On Mon, Mar 15, 2021 at 11:23:46AM -0400, Chet Ramey wrote: > On 3/15/21 3:29 AM, Mike Jonkmans wrote: > > I assume that the TAGS and tags files will not go into the repo. > > Why not? This is only the devel branch; they don't go into releases. Adding tags/TAGS to the repo would increase its size

Re: [Patch] .gitignore TAGS and tags

2021-03-15 Thread Chet Ramey
On 3/15/21 3:29 AM, Mike Jonkmans wrote: I assume that the TAGS and tags files will not go into the repo. Why not? This is only the devel branch; they don't go into releases. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrat

Re: [Patch] Makefile.in [ce]tags

2021-03-15 Thread Chet Ramey
On 3/15/21 3:10 AM, Mike Jonkmans wrote: The -x option to ctags generates 'human readable' stuff that vim can not use. I don't use vim, so that's OK for a default because it suits my needs. You can specify CTAGSFLAGS so it doesn't include -x to get something that works with vim (after this patc

Tab completion results in "unexpected EOF" error and crash

2021-03-15 Thread Xu Lu
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -DDEFAULT_PATH_VALUE='/usr/local/sbin:/usr/local/bin:/usr/bin' -DSTANDARD_UTILS_PATH='/usr/bin' -DSYS_BASHRC='/etc/ba

Re: 'exec' produced internal code output instead of normal

2021-03-15 Thread Alex fxmbsw7 Ratchev
hi, well, i mean as first example around exec socat, not socats exec directive ( which i used for script tho ) but i dont remember the circumstances it was long ago like a phenomen lines of code appeared instead of files i think but i cant recall exactly it just, i removed exec it worked normally

Re: 'exec' produced internal code output instead of normal

2021-03-15 Thread felix
On Sat, Mar 13, 2021 at 01:05:32AM +0100, Alex fxmbsw7 Ratchev wrote: > i have no example to write here as this was past long Without sample, i'ts hard to represent your case! > the story was, i was coding a file server daemon, with socat, Wow! > and i figured to use exec why not more exact more

[Patch] .gitignore TAGS and tags

2021-03-15 Thread Mike Jonkmans
I assume that the TAGS and tags files will not go into the repo. Regards, Mike Jonkmans diff --git .gitignore .gitignore index 1512a9ab..f09f4eac 100644 --- .gitignore +++ .gitignore @@ -113,3 +113,6 @@ examples/loadables/tty examples/loadables/uname examples/loadables/unlink examples/loadabl

[Patch] Makefile.in [ce]tags

2021-03-15 Thread Mike Jonkmans
The -x option to ctags generates 'human readable' stuff that vim can not use. This patch removes the -x and the '>$@', which is not needed. Refer to https://pubs.opengroup.org/onlinepubs/9699919799/utilities/ctags.html Also introducing $(ETAGS) $(ETAGSFLAGS) and same for CTAGS* Regards, Mike Jon