Re: Likely Bash bug

2021-03-18 Thread Dale R. Worley
Jay via Bug reports for the GNU Bourne Again SHell writes: > I have no idea what the "ash" the bug report refers to > is (there is an ancient shell of that name, but I cannot imagine any > distribution including that, instead of one of its bug fixed and updated > successors, like say, dash)

Re: Probably not a bug but I was surprised: $' does not work inside "..." close.

2021-03-18 Thread Dale R. Worley
Greg Wooledge writes: > $'...' is a form of quoting, not an expansion. It won't "work" inside > of another type of quoting, just like '...' will not "work" inside "...". Yes, that's true, and makes sense when I think about it. But the manual page doesn't consistently phrase it that way:

Re: missing way to extract data out of data

2021-03-18 Thread Dale R. Worley
Alex fxmbsw7 Ratchev writes: > there is way to crop data to wanted, by cropping the exclulsions away > but what about a way to extract data, eg @( .. ) match > not about using [[ =~ but only var internal stuff > .. or do i miss there something If you want to do a pattern-match against a string,

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

2021-03-18 Thread earnestly
On Thu, Mar 18, 2021 at 03:49:33PM -0400, Chet Ramey wrote: > 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. That makes sense but doesn't bode well for my issue. Perhaps I can find a way to

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

2021-03-18 Thread Chet Ramey
On 3/18/21 11:29 AM, earnestly wrote: When using edit-and-execute-command to edit the command-line I've noticed that PROMPT_COMMAND is not evaluated upon returning to the prompt It shouldn't be. Bash executes PROMPT_COMMAND before it calls readline to read the first line of a command.

Re: about control-l

2021-03-18 Thread Alex fxmbsw7 Ratchev
it may also be config path error cause i didnt PREFIX or so cause i dont want to but cp'd to /bin , but then still it installed and found paths i dunno, but i wish to analyze the problem, just help me on it, .. show me some cmds or what i should try, .. On Thu, Mar 18, 2021 at 8:29 PM Alex

Re: about control-l

2021-03-18 Thread Alex fxmbsw7 Ratchev
do you error out on configure for this case or not cause mine was running fine On Thu, Mar 18, 2021 at 8:25 PM Chet Ramey wrote: > On 3/18/21 12:10 PM, Alex fxmbsw7 Ratchev wrote: > > its a fresh system i probably dont have readline-dev or such maybe its > > cause that > > You need at least

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

2021-03-18 Thread Alex fxmbsw7 Ratchev
hm how can i help its a fresh deb all-tree's system, i had bash 5.1.4-maint from a month or so ago ( only binary from another system ) and fetched the new today and compiled and installed, and cp'd to /bin i suspect it could be internal readline short bindings issue, instdead of having the -dev

Re: about control-l

2021-03-18 Thread Chet Ramey
On 3/18/21 12:10 PM, Alex fxmbsw7 Ratchev wrote: its a fresh system i probably dont have readline-dev or such maybe its cause that You need at least ncurses-devel (or ncurses) so bash configure can find the terminfo library it needs to look up terminal control character sequences, and bash can

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, CWRUc...@case.edu

Discussing Readline

2021-03-18 Thread IFo Hancroft
Would this be the right place to discuss Readline as well as propose features? To not waste anyone's time, I'd also include an actual readline question I have: If readline is included in an ncurses software that also uses its own keybindings for things, how would that work? Does the software

about control-l

2021-03-18 Thread Alex fxmbsw7 Ratchev
its a fresh system i probably dont have readline-dev or such maybe its cause that

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

2021-03-18 Thread Alex fxmbsw7 Ratchev
i just report, sorry for overheat

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

2021-03-18 Thread Alex fxmbsw7 Ratchev
well i have nothing against, excepts my .c is weak ill get the k book then we can talk about it On Thu, Mar 18, 2021 at 4:27 PM Chet Ramey wrote: > On 3/18/21 11:03 AM, Alex fxmbsw7 Ratchev wrote: > > i also wanna say > > no extraction method is no good for a coding language ( no extraction as

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

2021-03-18 Thread earnestly
When using edit-and-execute-command to edit the command-line I've noticed that PROMPT_COMMAND is not evaluated upon returning to the prompt, e.g.: earnest i ~ PROMPT_COMMAND='echo foobar' foobar earnest i ~ set -x ++ echo foobar foobar earnest c ~ # use

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

2021-03-18 Thread Chet Ramey
On 3/18/21 11:03 AM, Alex fxmbsw7 Ratchev wrote: i also wanna say no extraction method is no good for a coding language ( no extraction as is only minus ( substraction ) is possible but no .. ) why dont you just enable backreferences \ of match for ${var/ and // and impent a regex variant, as

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

2021-03-18 Thread Alex fxmbsw7 Ratchev
i tried as i said array stuff by declare -p i tried to do the following thing without loop only with string assignments but failed cause cutment is not so my thing, rather extractments cat functions/assoc2arr declare dest=$1 cont=( "${@:2}" ) i=-1 src key res set -- while [[ -v cont[++i] ]] &&

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

2021-03-18 Thread Chet Ramey
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> >(tee -a stderr.log). So, yes, in this case it is working because printf is the parent - (which I never seemed to find actually calling open() of the file. It

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

2021-03-18 Thread Alex fxmbsw7 Ratchev
i also wanna say no extraction method is no good for a coding language ( no extraction as is only minus ( substraction ) is possible but no .. ) why dont you just enable backreferences \ of match for ${var/ and // and impent a regex variant, as you do by [[ =~ anyway On Thu, Mar 18, 2021 at 4:00

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

2021-03-18 Thread Alex fxmbsw7 Ratchev
as for goal, and no believance, it is handling quoting, string issues, nothing else you may know if you think about it im a freelance code there is nothing now but major functionality issues .. On Thu, Mar 18, 2021 at 3:57 PM Alex fxmbsw7 Ratchev wrote: > what, dude, of course you can regex

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

2021-03-18 Thread Alex fxmbsw7 Ratchev
what, dude, of course you can regex eerything right that is, for no quotes till non escaped end, ] probably for " its till nonescaped " and for $' till nonescaped ' i can regex it or extglob it hm ? but i need the results of grouping of the matches ( '( .. )' ) On Thu, Mar 18, 2021 at 3:39 PM

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

2021-03-18 Thread Greg Wooledge
On Thu, Mar 18, 2021 at 02:44:06PM +0100, Alex fxmbsw7 Ratchev wrote: > isnt it obvious .. No. > ${var//@(abc|cde)@(bla|blubb)/\2\1} # just like sed > and an extension for regex there That's a feature request. Chet can discuss that with you. All I can tell you is that this feature is not in

Re: Changing the way bash expands associative array subscripts

2021-03-18 Thread Alex fxmbsw7 Ratchev
wheres the sense of not having same var format rules as.. normal, but not for unset ? i can do arr[$key]= without problems, cool, why bug around big in unset ( aka choose keywords instead of lower for, ... important functionality ) On Wed, Mar 17, 2021 at 5:05 PM Jesse Hathaway wrote: > I

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

2021-03-18 Thread Alex fxmbsw7 Ratchev
i have currently no example i tried converting assoc 2 arr and reverses, as for examples, with content being weird filenames that tries were a week ago or so, i ended up in loops instead of parsing declare -p output sadly but i demand extraction stuff, not just cutting away ... isnt it obvious ..

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

2021-03-18 Thread Greg Wooledge
On Thu, Mar 18, 2021 at 02:15:19PM +0100, Alex fxmbsw7 Ratchev wrote: > pseudo exmaple Why not give a REAL example? > declare -A big=( mess of data ) > var=$( declare -p big ) > > now to extract the elements, beware with mess of data i dont mean 'mess' > 'of' 'data' You don't write bash code

repost of alike 'missing a way to extract data'

2021-03-18 Thread Alex fxmbsw7 Ratchev
as i got suggested here for help-bash for new .. there is ways to crop data to wanted by cropping the excludes out but where is the simple way of keeping matching i'd say implent backtrack references for @( .. ) etc groups pseudo exmaple declare -A big=( mess of data ) var=$( declare -p big )

Re: missing way to extract data out of data

2021-03-18 Thread Greg Wooledge
On Thu, Mar 18, 2021 at 02:01:12PM +0100, Alex fxmbsw7 Ratchev wrote: > there is way to crop data to wanted, by cropping the exclulsions away > but what about a way to extract data, eg @( .. ) match > not about using [[ =~ but only var internal stuff > .. or do i miss there something This is

missing way to extract data out of data

2021-03-18 Thread Alex fxmbsw7 Ratchev
there is way to crop data to wanted, by cropping the exclulsions away but what about a way to extract data, eg @( .. ) match not about using [[ =~ but only var internal stuff .. or do i miss there something

Re: Probably not a bug but I was surprised: $' does not work inside "..." close.

2021-03-18 Thread Greg Wooledge
On Wed, Mar 17, 2021 at 09:11:48PM -0400, Dale R. Worley wrote: > I have it encoded in my head that $ inside "..." is respected. Subtly, > the $'...' construction is not respected inside "...". Bash has 5 types of quoting: '...', "...", $'...', $"..." and backslash. $'...' is a form of quoting,

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

2021-03-18 Thread Michael Felt
On 17/03/2021 23:12, Chet Ramey wrote: On 3/17/21 3:29 PM, Michael Felt wrote: I tried as many combinations of commands as I could - and it seems that the regular behavior of dup2 on the opened fifo is enough to maintain communication. It's not, since FIFOs exist in the file system and have