Re: forwarded weirdness report

2022-03-29 Thread Alex fxmbsw7 Ratchev
please dont take it overly, accept free speech, and the lack of perfection
thats there always everywhere anyway
i will not read headpaining dumbshitt again, but wished a few words

i motiv ate you to too, few words here few words there, ..
greets

On Wed, Mar 30, 2022 at 7:47 AM Lawrence Velázquez  wrote:

> > On Mar 30, 2022, at 1:37 AM, Alex fxmbsw7 Ratchev 
> wrote:
> >
> > your default of not allowing is weird
> >
> > seems 'allowing alias foreworders to speak' not good to you ?
>
> You're misrepresenting what I said and what Chris said.  Read
> messages more closely before you pop off.
>
> --
> vq


Re: forwarded weirdness report

2022-03-29 Thread Lawrence Velázquez
> On Mar 30, 2022, at 1:37 AM, Alex fxmbsw7 Ratchev  wrote:
> 
> your default of not allowing is weird
> 
> seems 'allowing alias foreworders to speak' not good to you ?

You're misrepresenting what I said and what Chris said.  Read
messages more closely before you pop off.

-- 
vq


Re: forwarded weirdness report

2022-03-29 Thread Alex fxmbsw7 Ratchev
your default of not allowing is weird

seems 'allowing alias foreworders to speak' not good to you ? its norma;
see peng
not one THANK YOU and still unfriendly

On Wed, Mar 30, 2022 at 7:35 AM Lawrence Velázquez  wrote:

> > On Mar 29, 2022, at 8:26 AM, Chris Elvidge 
> wrote:
> >
> > On 28/03/2022 22:00, Greg Wooledge wrote:
> >> Or -- and I know this answer will be rejected, because it's too simple
> >> and sensible -- stop using aliases in scripts.
> >
> > +1
> >
> > Or could just stop answering questions about aliases in scripts
>
> Unfortunately this might simply allow the alias zealots to form an
> unstoppable positive feedback loop.
>
> --
> vq
>
>


Re: forwarded weirdness report

2022-03-29 Thread Lawrence Velázquez
> On Mar 29, 2022, at 8:26 AM, Chris Elvidge  wrote:
> 
> On 28/03/2022 22:00, Greg Wooledge wrote:
>> Or -- and I know this answer will be rejected, because it's too simple
>> and sensible -- stop using aliases in scripts.
> 
> +1
> 
> Or could just stop answering questions about aliases in scripts

Unfortunately this might simply allow the alias zealots to form an
unstoppable positive feedback loop.

-- 
vq



Re: forwarded weirdness report

2022-03-29 Thread Alex fxmbsw7 Ratchev
ignorance priest ?

On Tue, Mar 29, 2022, 14:27 Chris Elvidge  wrote:

> On 28/03/2022 22:00, Greg Wooledge wrote:
> >
> > Or -- and I know this answer will be rejected, because it's too simple
> > and sensible -- stop using aliases in scripts.
> >
> >
>
> +1
>
> Or could just stop answering questions about aliases in scripts
>
> --
> Chris Elvidge
> England
>
>
>


Re: forwarded weirdness report

2022-03-29 Thread Chris Elvidge

On 28/03/2022 22:00, Greg Wooledge wrote:


Or -- and I know this answer will be rejected, because it's too simple
and sensible -- stop using aliases in scripts.




+1

Or could just stop answering questions about aliases in scripts

--
Chris Elvidge
England




Re: forwarded weirdness report

2022-03-29 Thread Martin Schulte
Hello Greg, hello *!

> And here's a workaround:
> 
> unicorn:~$ bash --noprofile --norc -i -c $'alias x="echo hallo"; x'
> bash: x: command not found
> unicorn:~$ bash --noprofile --norc -i -c $'alias x="echo hallo"\nx'
> hallo

Really cool - thanks!

> Put a literal newline in the -c argument, rather than a semicolon.
> 
> Or -- and I know this answer will be rejected, because it's too simple 
> and sensible -- stop using aliases in scripts.

Or even stop using them at all,

alias egrep1='grep -E'

doesn't save much compared to

egrep2() { grep -E "$@" ; }

Or is there a reason why one shouldn't use this in an interactive shell?

Best regards

Martin



Re: forwarded weirdness report

2022-03-28 Thread Alex fxmbsw7 Ratchev
On Mon, Mar 28, 2022 at 11:02 PM Greg Wooledge  wrote:

> On Mon, Mar 28, 2022 at 04:18:05PM -0400, Chet Ramey wrote:
> > On 3/28/22 3:06 PM, Martin Schulte wrote:
> > > on Mon, 28 Mar 2022 20:34:40 +0200 Alex fxmbsw7 Ratchev <
> fxmb...@gmail.com> wrote:
> > > > https://pastebin.com/raw/T7ZnFapt
> > >
> > > Here's a somewhat stripped down version:
> > >
> > > $ bash --noprofile --norc -i -c "echo \$BASH_VERSION; shopt -s
> expand_aliases ; source <(echo \"alias x='echo hallo'\"); alias; x"
> > > 5.1.4(1)-release
> > > alias x='echo hallo'
> > > bash: x: command not found
> >
> > OK, once more from the top.
> >
> > The argument to -c is a single command. Bash always reads a complete
> command
> > before executing any of it. The argument string is parsed into a
> > compound command: a compound list. Since the entire compound list is
> parsed
> > before executing any of the commands it contains, the `x' is parsed as a
> > simple command with no defined alias -- the parsing takes place before
> > executing the `alias x=...' command.
>
> And here's a workaround:
>
> unicorn:~$ bash --noprofile --norc -i -c $'alias x="echo hallo"; x'
> bash: x: command not found
> unicorn:~$ bash --noprofile --norc -i -c $'alias x="echo hallo"\nx'
> hallo
>
> Put a literal newline in the -c argument, rather than a semicolon.
>
> Or -- and I know this answer will be rejected, because it's too simple
> and sensible -- stop using aliases in scripts.
>

well mate, i must argue here
aliases, are the smallest part of replicatinng code, without function spawn
and arg parsing overheat
if u cant handle em, u stay away from em, like u do
i need em, basic important big part of coding languages
against dup code


Re: forwarded weirdness report

2022-03-28 Thread Greg Wooledge
On Mon, Mar 28, 2022 at 04:18:05PM -0400, Chet Ramey wrote:
> On 3/28/22 3:06 PM, Martin Schulte wrote:
> > on Mon, 28 Mar 2022 20:34:40 +0200 Alex fxmbsw7 Ratchev  
> > wrote:
> > > https://pastebin.com/raw/T7ZnFapt
> > 
> > Here's a somewhat stripped down version:
> > 
> > $ bash --noprofile --norc -i -c "echo \$BASH_VERSION; shopt -s 
> > expand_aliases ; source <(echo \"alias x='echo hallo'\"); alias; x"
> > 5.1.4(1)-release
> > alias x='echo hallo'
> > bash: x: command not found
> 
> OK, once more from the top.
> 
> The argument to -c is a single command. Bash always reads a complete command
> before executing any of it. The argument string is parsed into a
> compound command: a compound list. Since the entire compound list is parsed
> before executing any of the commands it contains, the `x' is parsed as a
> simple command with no defined alias -- the parsing takes place before
> executing the `alias x=...' command.

And here's a workaround:

unicorn:~$ bash --noprofile --norc -i -c $'alias x="echo hallo"; x'
bash: x: command not found
unicorn:~$ bash --noprofile --norc -i -c $'alias x="echo hallo"\nx'
hallo

Put a literal newline in the -c argument, rather than a semicolon.

Or -- and I know this answer will be rejected, because it's too simple 
and sensible -- stop using aliases in scripts.



Re: forwarded weirdness report

2022-03-28 Thread Alex fxmbsw7 Ratchev
ok thanks for cool explaintion

i may beg for more intelligent, more 'human readable format' supporting

such as, code is there, that it doesnt run is implentation fault

however u aint alone
gawk parser in combination with djb tcpserver results ( ill try again soon
) in big fails in proceeding after found RS, cause, the parser implentation
misses it, cause its bad coded not-per-char match ( just some invalid )

a main gawk coder said, everything should get rewritten, and it wont, so
just l

greets, bless

On Mon, Mar 28, 2022, 22:18 Chet Ramey  wrote:

> On 3/28/22 3:06 PM, Martin Schulte wrote:
> > Hello,
> >
> > on Mon, 28 Mar 2022 20:34:40 +0200 Alex fxmbsw7 Ratchev <
> fxmb...@gmail.com> wrote:
> >> https://pastebin.com/raw/T7ZnFapt
> >>
> >> about inconsitency, about chets 'uh no bugs'
> >>
> >> ive experienced this and such x times already ( got better, this is not
> my
> >> code )
> >
> > Here's a somewhat stripped down version:
> >
> > $ bash --noprofile --norc -i -c "echo \$BASH_VERSION; shopt -s
> expand_aliases ; source <(echo \"alias x='echo hallo'\"); alias; x"
> > 5.1.4(1)-release
> > alias x='echo hallo'
> > bash: x: command not found
>
> OK, once more from the top.
>
> The argument to -c is a single command. Bash always reads a complete
> command before executing any of it. The argument string is parsed into a
> compound command: a compound list. Since the entire compound list is parsed
> before executing any of the commands it contains, the `x' is parsed as a
> simple command with no defined alias -- the parsing takes place before
> executing the `alias x=...' command.
>
> --
> ``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: forwarded weirdness report

2022-03-28 Thread Chet Ramey

On 3/28/22 3:06 PM, Martin Schulte wrote:

Hello,

on Mon, 28 Mar 2022 20:34:40 +0200 Alex fxmbsw7 Ratchev  
wrote:

https://pastebin.com/raw/T7ZnFapt

about inconsitency, about chets 'uh no bugs'

ive experienced this and such x times already ( got better, this is not my
code )


Here's a somewhat stripped down version:

$ bash --noprofile --norc -i -c "echo \$BASH_VERSION; shopt -s expand_aliases ; source <(echo 
\"alias x='echo hallo'\"); alias; x"
5.1.4(1)-release
alias x='echo hallo'
bash: x: command not found


OK, once more from the top.

The argument to -c is a single command. Bash always reads a complete 
command before executing any of it. The argument string is parsed into a

compound command: a compound list. Since the entire compound list is parsed
before executing any of the commands it contains, the `x' is parsed as a
simple command with no defined alias -- the parsing takes place before
executing the `alias x=...' command.

--
``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: forwarded weirdness report

2022-03-28 Thread Lawrence Velázquez
On Mon, Mar 28, 2022, at 3:06 PM, Martin Schulte wrote:
> on Mon, 28 Mar 2022 20:34:40 +0200 Alex fxmbsw7 Ratchev 
>  wrote:
>> https://pastebin.com/raw/T7ZnFapt
>
> Here's a somewhat stripped down version:
>
> $ bash --noprofile --norc -i -c "echo \$BASH_VERSION; shopt -s 
> expand_aliases ; source <(echo \"alias x='echo hallo'\"); alias; x"
> 5.1.4(1)-release
> alias x='echo hallo'
> bash: x: command not found

https://www.gnu.org/software/bash/manual/html_node/Aliases.html

Bash always reads at least one complete line of input, and all
lines that make up a compound command, before executing any of
the commands on that line or the compound command.  Aliases are
expanded when a command is read, not when it is executed.
Therefore, an alias definition appearing on the same line as
another command does not take effect until the next line of
input is read.  The commands following the alias definition on
that line are not affected by the new alias.

This also applies if the command defines the alias indirectly (e.g.,
by sourcing a second file that contains the `alias` commands).

-- 
vq



Re: forwarded weirdness report

2022-03-28 Thread Martin Schulte
Hello,

on Mon, 28 Mar 2022 20:34:40 +0200 Alex fxmbsw7 Ratchev  
wrote:
> https://pastebin.com/raw/T7ZnFapt
> 
> about inconsitency, about chets 'uh no bugs'
> 
> ive experienced this and such x times already ( got better, this is not my
> code )

Here's a somewhat stripped down version:

$ bash --noprofile --norc -i -c "echo \$BASH_VERSION; shopt -s expand_aliases ; 
source <(echo \"alias x='echo hallo'\"); alias; x"
5.1.4(1)-release
alias x='echo hallo'
bash: x: command not found

Best regards

Martin



Re: forwarded weirdness report

2022-03-28 Thread Alex fxmbsw7 Ratchev
well irc recalled its cause aliases expand after one newline
what the outdated ...

On Mon, Mar 28, 2022 at 8:34 PM Alex fxmbsw7 Ratchev 
wrote:

> https://pastebin.com/raw/T7ZnFapt
>
> about inconsitency, about chets 'uh no bugs'
>
> ive experienced this and such x times already ( got better, this is not my
> code )
>


forwarded weirdness report

2022-03-28 Thread Alex fxmbsw7 Ratchev
https://pastebin.com/raw/T7ZnFapt

about inconsitency, about chets 'uh no bugs'

ive experienced this and such x times already ( got better, this is not my
code )