sorry for possible negative effected texting i d wish to discuss , why aliases are a big gain , and why so my indenting
i ve been in #bash and #awk since 200[012] , where such negative english texting like me getting banned there for years , .. i did learn back then , and did , and do answer bash awk q s with top code ( to my subjective level ) many of my res es was marked as 'impossible' or 'shitty old sh like workaround' , by .. uhm whoever later then went unfriendly and so i quit the , english wrong chat .. i understand here may be not the place for such a discussion , whenever u wanted to join .. i just .. began mentioning it here u know a place to post pro tech topics ? or smth ? On Thu, Jul 20, 2023, 8:22 AM Martin D Kealey <mar...@kurahaupo.gen.nz> wrote: > Hi Alex > > Aliases are not functions, and they don't work the same way. > > A function is like a separate script, except that it runs in the same > process & context as the caller. Its meaning is determined as the script > RUNS. > An alias is quite different: it replaces tokens while the script is being > PARSED. > do u know , that is around the big process where the bash determines when thers errs in the file to exec an err msg and fail to run In particular, > alias A='B ; C' > D && A > will replace `A` with `B ; C` to get `D && B ; C` which is THEN parsed > into the equivalent of: > { D && B ; } ; C > > (Same if you use a line break instead of a semicolon.) > a yes my detail thinking error , already the ~third time in my time thank u much bout pointing this out .. i .. thought .. aliases are text replacements what i didnt know is .. whats a bit obvious .. bash replaces em when read , not just in [[ $? 0 , but completly regardless of the code .. then makes sense that there continue .. my bug The output of `set -x` reflects the structure of the code, not the literal > text. We expect it to exclude comments, extra blank lines, and names of > aliases where they are used. > > Unless you actually need to modify how a script is PARSED, don't use > aliases; use functions instead. > im an old tech style veteran , aliases are there to be learned noone could still force me to use limited ( due to wrong / outdated rules ) instead unlimited i mean , u say , like many else , aliases arent to be used is that cause many fails ? its pure braindamage alike the sayings 'bash is no programming language' many times and tho just from a few users i contered it the same way .. bs nonsense -Martin > > PS: please use structure-indicative indentation when showing examples. > ah oh my spacing ( since i dont tab ) i did that since long for long now , same as i thought back then about ur tabbing finding it cool its a massive non maintainable desaster and as i thought cool , my ' cool ' about my current style cmds=0spaces [[ cond ]] && { cmd1 cmd2 } for i in bla ; do [[ foo ]] && a || b done cmds no space no op / conditional +1 space id call it reverse tabbing , or some other texting its the delight have to think 0.1% about wtf id indent ( not happily with it ) on old style ill todo a better text description , and positive sides of it greets >