Re: Behaviour of test -v with assoc array and quote character in key

2021-02-15 Thread Chet Ramey
tes to suppress the expansion the array subscript evaluation performs. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: export loses error

2021-02-15 Thread Chet Ramey
On 2/14/21 4:03 AM, Stephane Chazelas wrote: 2021-02-09 10:23:51 -0500, Chet Ramey: [...] It's the assignment statement that's the oddball here; it's the only place where the exit status from a command substitution has any effect. This is a POSIX (maybe ksh) invention to pro

Re: [PATCH] Fix blocking read timeouts at a small probability

2021-02-15 Thread Chet Ramey
locks. If you need a timeout on the order of a single microsecond in a shell script, I urge you to reconsider your choices. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...

Re: syntax error while parsing a case command within `$(...)'

2021-02-15 Thread Chet Ramey
d at that for a long time. (I tried it once, years ago, but there were problems with making it work.) -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: syntax error while parsing a case command within `$(...)'

2021-02-15 Thread Chet Ramey
trying to get old versions of bash. The oldest I have is bash-1.02. Regrettably, neither Brian nor I saved copies of the really old ones. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech,

Re: syntax error while parsing a case command within `$(...)'

2021-02-15 Thread Chet Ramey
pected here. It is unexpected, though the syntax is obscure. I'll fix it. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: syntax error while parsing a case command within `$(...)'

2021-02-15 Thread Chet Ramey
On 2/15/21 4:35 PM, Lawrence Velázquez wrote: On Feb 15, 2021, at 10:01 AM, Chet Ramey wrote: The bash command substitution parser handles the majority of these cases (heh) lol I chuckled, well done I'll be here all week. -- ``The lyf so short, the craft so long to lerne.'&

Re: syntax error while parsing a case command within `$(...)'

2021-02-15 Thread Chet Ramey
On 2/15/21 5:39 PM, Koichi Murase wrote: 2021年2月16日(火) 5:12 Chet Ramey : It is unexpected, though the syntax is obscure. I'll fix it. If this is to be fixed, maybe also the following cases could be handled better (if the corresponding fixes are not too complicated). At some point,

Re: syntax error while parsing a case command within `$(...)'

2021-02-16 Thread Chet Ramey
is just academic. No sane person would write these without some kind of delimiter. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: syntax error while parsing a case command within `$(...)'

2021-02-17 Thread Chet Ramey
On 2/17/21 9:53 AM, Oğuz wrote: 16 Şubat 2021 Salı tarihinde Chet Ramey <mailto:chet.ra...@case.edu>> yazdı: This is just academic. No sane person would write these without some kind of delimiter. Yeah, `parse_comsub' really needs some work anyway. Don't worry

Re: syntax error while parsing a case command within `$(...)'

2021-02-17 Thread Chet Ramey
ively) and completely impossible to do portably with yacc. The situation with bison may have improved. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: syntax error while parsing a case command within `$(...)'

2021-02-18 Thread Chet Ramey
works just fine? ps: I am sure Chet will confirm that I am not shy about pointing out bash bugs/defects that shoukd be fixed when I come accross one. Can confirm. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippo

Re: syntax error while parsing a case command within `$(...)'

2021-02-18 Thread Chet Ramey
;s no practical benefit. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: syntax error while parsing a case command within `$(...)'

2021-02-21 Thread Chet Ramey
ort, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: syntax error while parsing a case command within `$(...)'

2021-02-22 Thread Chet Ramey
On 2/22/21 12:59 AM, Oğuz wrote: 21 Şubat 2021 Pazar tarihinde Chet Ramey <mailto:chet.ra...@case.edu>> yazdı: On 2/21/21 3:05 PM, Oğuz wrote: With the latest push to devel bash now accepts `if ! [[ ... ]] then :; fi' too, but not `:() ! [[ ... ]]'. I

Re: Behaviour of test -v with assoc array and quote character in key

2021-02-22 Thread Chet Ramey
On 2/15/21 1:28 PM, Daniel Gröber wrote: On Mon, Feb 15, 2021 at 09:11:48AM -0500, Chet Ramey wrote: `test' is always going to be problematic here because, as a shell builtin, its arguments undergo a round of word expansions before it's invoked. It's difficult to reliably det

Re: building 5.1.3 -- some probs...

2021-02-22 Thread Chet Ramey
command that's dumping core (something in one of your startup files) and your locale. A backtrace from the core dump would help, too, but not as much. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocr

Re: Assign read-only variables return code not usable inline

2021-02-23 Thread Chet Ramey
" That command is the and-or list the shell is executing; the shell jumps back to the top-level processing loop. Bash does this in interactive and non-interactive shells in default mode. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa,

Re: Shell Grammar man page

2021-02-23 Thread Chet Ramey
ash grammar is a little messier than that POSIX grammar in https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_10_02 but it's basically the same. Where are you trying to go with this? -- ``The lyf so short, the craft so long to lerne.'' - Chaucer

Re: building 5.1.3 -- some probs...

2021-02-23 Thread Chet Ramey
evis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Behaviour of test -v with assoc array and quote character in key

2021-02-23 Thread Chet Ramey
r treat the array subscript as somehting to be expanded, but that was the consequence of the decision to treat subscripts consistently across different contexts. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: another mail try for the hang 100% cpu alias run bug

2021-02-24 Thread Chet Ramey
#x27;t see a hang in either case. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Shell Grammar man page

2021-02-24 Thread Chet Ramey
On 2/23/21 7:31 PM, Mike Jonkmans wrote: On Tue, Feb 23, 2021 at 04:33:44PM -0500, Chet Ramey wrote: On 2/22/21 8:11 AM, Mike Jonkmans wrote: Hi, It seems some things are missing in the bash manual. Notably definition of command and placements of coproc- and function-definition. The section

Re: building 5.1.3 -- some probs...

2021-02-24 Thread Chet Ramey
On 2/24/21 3:04 PM, L A Walsh wrote: On 2021/02/23 14:10, Chet Ramey wrote: On 2/22/21 10:09 PM, L A Walsh wrote: export _home_prefix=${HOME%/*}/ I can't reproduce it, though I'm sure this is the line where it crashes for you. What is HOME set to? HOME=/home/law so  _home_pref

Re: Shell Grammar man page

2021-02-25 Thread Chet Ramey
to compound-command. No. It's not. Even the POSIX grammar definition makes that clear. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: [PATCH] Fix history deletion when using negative offsets (from the end)

2021-02-26 Thread Chet Ramey
s longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Shell Grammar man page

2021-02-26 Thread Chet Ramey
he lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: [PATCH] Fix history deletion when using negative offsets (from the end)

2021-02-26 Thread Chet Ramey
``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Shell Grammar man page function definition

2021-02-28 Thread Chet Ramey
ne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: is it normal that set -x unset commands dont display special chars in the content

2021-02-28 Thread Chet Ramey
? -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: [PATCH] Fix history deletion when using negative offsets (from the end)

2021-02-28 Thread Chet Ramey
``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: is it normal that set -x unset commands dont display special chars in the content

2021-02-28 Thread Chet Ramey
On 2/28/21 5:32 PM, k...@plushkava.net wrote: On 28/02/2021 22:13, Chet Ramey wrote: On 2/27/21 6:14 AM, Alex fxmbsw7 Ratchev wrote: but they get unset right, just doesnt display em i have stuff with $'\34' separator and in set -x output the text is just flat for the unset +

Re: is it normal that set -x unset commands dont display special chars in the content

2021-02-28 Thread Chet Ramey
arguments are treated, not the builtin itself. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Shell Grammar man page function definition

2021-03-01 Thread Chet Ramey
. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: `${@:0}' expands to `$0 $1 ...', even though `$0' is not a positional parameter

2021-03-03 Thread Chet Ramey
at offset. "If offset is 0, and the positional parameters are used, $0 is prefixed to the list." -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: declare -n next=arr[++elem] == nowork ? [[ -v

2021-03-08 Thread Chet Ramey
ugh the values of the array, you're better off ditching namerefs and using `eval' or [[ -v $next ]] (if you want to maintain the same code structure) or some other construct. It would be much clearer to simply use a for loop to iterate from 0 to ${#foo[@]}. -- ``The lyf so short, the craf

Re: declare -n next=arr[++elem] == nowork ? [[ -v

2021-03-09 Thread Chet Ramey
would be a good place for that discussion. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: so-called pipe files (sh-np-*) do not get deleted when processes close.

2021-03-11 Thread Chet Ramey
because the process substitution does not exit before the shell does. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: unsetting associative array executes commands

2021-03-11 Thread Chet Ramey
SNOTEXIST)]: bad array subscript $ cat x1 declare -A blah blah['$(DOESNOTEXIST)']=broken shopt -s assoc_expand_once for i in "${!blah[@]}"; do unset blah["$i"]; done declare -p blah $ ../bash-5.1-patched/bash ./x1 declare -A blah=() -- ``The lyf so short, the cra

Re: unsetting associative array executes commands

2021-03-11 Thread Chet Ramey
means its arguments undergo the standard word expansions before `unset' even sees them. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: unsetting associative array executes commands

2021-03-11 Thread Chet Ramey
On 3/11/21 3:50 PM, Andreas Schwab wrote: On Mär 11 2021, Chet Ramey wrote: $ cat x1 declare -A blah blah['$(DOESNOTEXIST)']=broken shopt -s assoc_expand_once touch blah\$ for i in "${!blah[@]}"; do unset blah["$i"]; done declare -p blah $ ../bash-5.1-pat

Re: so-called pipe files (sh-np-*) do not get deleted when processes close.

2021-03-11 Thread Chet Ramey
On 3/11/21 3:55 PM, Michael Felt (aixtools) wrote:  Sent from my iPhone On 11 Mar 2021, at 18:15, Chet Ramey wrote: On 3/11/21 11:28 AM, Michael Felt wrote: Hi, Issue: AdoptOpenJDK build process makes bash calls in a particular way. An abbreviated (shorter pathnames) example is

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

2021-03-15 Thread Chet Ramey
orks with vim (after this patch, of course). -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: [Patch] .gitignore TAGS and tags

2021-03-15 Thread Chet Ramey
ga, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

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

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

2021-03-15 Thread Chet Ramey
his bug to bash. Thanks for the report. I can't reproduce the double free, but it shouldn't be reporting an error during completion. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippo

Changing the way bash expands associative array subscripts

2021-03-15 Thread Chet Ramey
obviously, I claim, it's more desirable behavior. I would have to make the old behavior, including the previous behavior of `assoc_expand_once', dependent on BASH_COMPAT=51. But I think it's better behavior, fixes a number of shortcomings in the current implementation, and sets things up better for future changes. What do folks think? Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: is it a bug that PWD=whatever sets PS1's \w to that regardless

2021-03-16 Thread Chet Ramey
. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: so-called pipe files (sh-np-*) do not get deleted when processes close.

2021-03-16 Thread Chet Ramey
OR: Undefined symbol: .mkdtemp Then how does configure find it? It's a POSIX function, and that file includes the appropriate headers. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: so-called pipe files (sh-np-*) do not get deleted when processes close.

2021-03-16 Thread Chet Ramey
On 3/16/21 11:07 AM, Michael Felt wrote: On 16/03/2021 14:38, Chet Ramey wrote: On 3/16/21 8:04 AM, Michael Felt wrote: Decided to give bash-5.1 a try. I doubt it is major, but I get as far as: "../../../src/bash-5.1.0/lib/sh/tmpfile.c", line 289.11: 1506-068 (W) Operation bet

Re: [Patch] distclean should not rm lib/readline/doc/Makefile

2021-03-16 Thread Chet Ramey
f so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: is it a bug that PWD=whatever sets PS1's \w to that regardless

2021-03-17 Thread Chet Ramey
Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: crash in __waitpid() via waitchld() in bash 4.4.23(1) on arm64

2021-03-17 Thread Chet Ramey
``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: bug in auto completition, dunno if by completition package

2021-03-17 Thread Chet Ramey
ult on a successful completion. Command completion attempts its fallback directory completion only if there are no command names that match. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: so-called pipe files (sh-np-*) do not get deleted when processes close.

2021-03-17 Thread Chet Ramey
in a pathname. You can't just remove the pathname after the child opens it. How will other processes that want to communicate with the process substitution use it? -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis''

Re: bug in auto completition, dunno if by completition package

2021-03-17 Thread Chet Ramey
``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: so-called pipe files (sh-np-*) do not get deleted when processes close.

2021-03-17 Thread Chet Ramey
On 3/17/21 11:17 AM, Michael Felt wrote: On 11/03/2021 18:11, Chet Ramey wrote: On 3/11/21 11:28 AM, Michael Felt wrote: Hi, Issue: AdoptOpenJDK build process makes bash calls in a particular way. An abbreviated (shorter pathnames) example is: ``` bash-5.0$ /usr/bin/printf "Bui

Re: so-called pipe files (sh-np-*) do not get deleted when processes close.

2021-03-17 Thread Chet Ramey
o? -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: is it a bug that \e's dont get escaped in declare -p output

2021-03-17 Thread Chet Ramey
lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: so-called pipe files (sh-np-*) do not get deleted when processes close.

2021-03-18 Thread Chet Ramey
ntf command is syntactic sugar for something like (with no error checking): { /usr/bin/printf >tmpout 2>tmperr cat tmperr tmpout cat tmpout >> stdout.log cat tmperr >> stderr.log rm -f tmpout tmperr } -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: repost of alike 'missing a way to extract data'

2021-03-18 Thread Chet Ramey
you do by [[ =~ anyway "Why don't you," indeed. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: in devel tree currently control-l doesnt refresh it prints newline or something non clearing

2021-03-18 Thread Chet Ramey
On 3/18/21 12:08 PM, Alex fxmbsw7 Ratchev wrote: i just report, sorry for overheat I can't reproduce this. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU

Re: about control-l

2021-03-18 Thread Chet Ramey
link with it. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: PROMPT_COMMAND is not executed after edit-and-execute-command

2021-03-18 Thread Chet Ramey
e at that point. Since readline prints the prompt as part of redisplay, and it doesn't know anything about PROMPT_COMMAND or command execution, it doesn't execute it. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'

Re: why does this define bla() instead of respect the newline as command separator

2021-03-19 Thread Chet Ramey
t to alias expansion. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: in devel tree currently control-l doesnt refresh it prints newline or something non clearing

2021-03-19 Thread Chet Ramey
so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Discussing Readline

2021-03-19 Thread Chet Ramey
of input. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Character corruption

2021-03-19 Thread Chet Ramey
This looks like the same issue as the one reported in https://savannah.gnu.org/patch/?10035 which was fixed a few weeks ago in the devel branch. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrate

Re: so-called pipe files (sh-np-*) do not get deleted when processes close.

2021-03-22 Thread Chet Ramey
On 3/20/21 3:15 PM, Michael Felt wrote: Scraping through this - thanks for the lessons aka explanations. On 18/03/2021 16:08, Chet Ramey wrote: On 3/18/21 5:53 AM, Michael Felt wrote: Yes, something to test. Thx. The ojdk scenario is: /usr/bin/printf > >(tee -a stdout.log) 2>

Re: ignoreeof variable (lowercase) as a synonym for IGNOREEOF

2021-03-22 Thread Chet Ramey
anywhere, is this on purpose? It exists only for backwards compatibility; it's deprecated and has been for years. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: so-called pipe files (sh-np-*) do not get deleted when processes close.

2021-03-22 Thread Chet Ramey
nd it. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: about the local not-on-every-function-separately var issue

2021-03-29 Thread Chet Ramey
c1, shadow- ing any global variable named var." -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Changing the way bash expands associative array subscripts

2021-03-29 Thread Chet Ramey
``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Changing the way bash expands associative array subscripts

2021-03-29 Thread Chet Ramey
implementing the zsh mini-language for expansion modifier flags. If someone wanted to take a run at it, I'd be interested in seeing the results. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Changing the way bash expands associative array subscripts

2021-03-29 Thread Chet Ramey
On 3/16/21 8:34 AM, Greg Wooledge wrote: I would not complain if unset became a shell keyword I'm not considering this. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU

Re: Changing the way bash expands associative array subscripts

2021-03-29 Thread Chet Ramey
On 3/15/21 9:41 PM, Koichi Murase wrote: 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

Re: why does this define bla() instead of respect the newline as command separator

2021-03-29 Thread Chet Ramey
o short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: why does this define bla() instead of respect the newline as command separator

2021-03-29 Thread Chet Ramey
; - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

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

2021-03-29 Thread Chet Ramey
7; - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: zsh style associative array assignment bug

2021-03-29 Thread Chet Ramey
so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Changing the way bash expands associative array subscripts

2021-03-30 Thread Chet Ramey
ne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: zsh style associative array assignment bug

2021-03-30 Thread Chet Ramey
On 3/29/21 6:40 PM, Eric Cook wrote: On 3/29/21 5:18 PM, Chet Ramey wrote: If you look at a=( k1 v1 k2 v2 k3 v3) as more or less syntactic sugar for a=( [k1]=v1 [k2]=v2 [k3]=v3 ) it's reasonable that a=( k1 v1 k2 ) is equivalent to a=( [k1]=v1 [k2]= ). And that's what bash doe

Re: zsh style associative array assignment bug

2021-03-30 Thread Chet Ramey
On 3/30/21 12:42 PM, Eric Cook wrote: On 3/30/21 10:54 AM, Chet Ramey wrote: On 3/29/21 6:40 PM, Eric Cook wrote: Its just when populating that array dynamically with another array if that second array didn't contain `v1' hypothetically, the array gets shifted to OK, how would y

Re: select syntax violates the POLA

2021-04-01 Thread Chet Ramey
ed from the Bourne shell, to allow it. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: select syntax violates the POLA

2021-04-05 Thread Chet Ramey
ved word, while ) is an operator. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Changing the way bash expands associative array subscripts

2021-04-05 Thread Chet Ramey
work without resorting to wrappers. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: select syntax violates the POLA

2021-04-05 Thread Chet Ramey
On 4/5/21 5:06 AM, Greywolf wrote: the same level of egregious brokenness as select. Good god, take a breath. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc

Re: Changing the way bash expands associative array subscripts

2021-04-05 Thread Chet Ramey
t for this as part of assoc_expand_once, but it's incomplete in bash-5.1. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: No such device or address when opening /dev/fd/ on opened /dev/tcp socket

2021-04-05 Thread Chet Ramey
instance, which has /dev/fd. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: No such device or address when opening /dev/fd/ on opened /dev/tcp socket

2021-04-05 Thread Chet Ramey
On 4/5/21 3:14 PM, Oğuz wrote: 5 Nisan 2021 Pazartesi tarihinde Chet Ramey <mailto:chet.ra...@case.edu>> yazdı: There's no guarantee that file descriptors opened with socket(2) show up in /dev/fd. Bash doesn't emulate /dev/fd if the system provides it, so it's u

Re: select syntax violates the POLA

2021-04-05 Thread Chet Ramey
short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: select syntax violates the POLA

2021-04-05 Thread Chet Ramey
t, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: select syntax violates the POLA

2021-04-05 Thread Chet Ramey
On 4/1/21 5:54 PM, Greywolf wrote: On 4/1/2021 8:57, Chet Ramey wrote: It's more like `select' doesn't inherit some of the shell's special cases.     select dir in ${d[@]}; do {     break;     } done; ...but select breaks on the "} done;"

Re: Empty array referenced by indirection reports unbound variable

2021-04-07 Thread Chet Ramey
r. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Empty array referenced by indirection reports unbound variable

2021-04-07 Thread Chet Ramey
On 4/7/21 10:39 AM, konsolebox wrote: On Wed, Apr 7, 2021 at 9:25 PM Chet Ramey wrote: On 4/5/21 4:45 PM, konsolebox wrote: set -u array=() __ref=array[@] : "${array[@]}" # Reports nothing This is a special case, mirroring the special case that POSIX carved out for $@ and

Re: Changing the way bash expands associative array subscripts

2021-04-08 Thread Chet Ramey
On 4/5/21 6:49 PM, konsolebox wrote: On Mon, Apr 5, 2021 at 9:44 PM Chet Ramey wrote: On 4/1/21 3:02 PM, konsolebox wrote: To do what, exactly? To keep this working in both behaviors. declare -A a key='$(echo foo)' a[$key]=1 unset 'a["$key"]' declare -p a

Re: Changing the way bash expands associative array subscripts

2021-04-08 Thread Chet Ramey
On 4/6/21 1:55 AM, Koichi Murase wrote: 2021年3月30日(火) 0:03 Chet Ramey : On 3/15/21 9:41 PM, Koichi Murase wrote: Can you also take care of the behavior of `unset -v 'a[@]''? Well, you have to pick one behavior or another. The `@' subscript always expands to all membe

Re: Changing the way bash expands associative array subscripts

2021-04-08 Thread Chet Ramey
g to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Changing the way bash expands associative array subscripts

2021-04-08 Thread Chet Ramey
ong to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Changing the way bash expands associative array subscripts

2021-04-08 Thread Chet Ramey
e lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

  1   2   3   4   5   6   7   8   9   10   >