Just some random thoughts:

On Sun 16 Jun 2024 at 18:13:36 (+1000), Keith Bainbridge wrote:
> 
> Some of my aliases stopped working after months of working as I
> expected. And udating the .bash_aliases kept giving me an error
> referring to an end of file before the matching ' in one of the last
> aliases.  So I did some searching.

All the aliases that lie textually after the one with the missing '
will remain undefined, so you can use bisection to locate where in
the file problem lies.

> So, is an alias a form of variable?  I had about 150 plus 4 functions

There's little chance of hitting bash's limits unless you're
generating the aliases or functions programmatically, and they'd
need naming systematically for you to be able to remember them all.

> So I re-did my .bash_aliases file with only the bits I NEED; and all
> is back to normal.

It looks like the error was in something that you judged you didn't need,
and you removed it.

> When I got my aliases working, I checked the size of the old file -
> 17K. The new .bash_aliases is 2.5K with .bash_functions at 490B.

In any case, the bash limits you quoted were concerned with the number
of definitions, not the size of the files containing them.

Interesting that your aliases are on average as big as your functions.
About 90 of my aliases occupy 3.5k, whereas ~350 functions occupy 240k,
so averaging around 40 and 680 characters each, respectively.

> The errant function that failed after a little satisfactory use was to
> mount a USB and back it up to my system. It is used to run portable
> apps at a volunteer job - yes windows. I noticed that the sample
> functions on the web didn't have && for each line, so I removed them
> and performance is now back to what I expected.  The errant line was
> the mount cmd. Originally if I had already mounted the USB, the
> function kept going. I don't recall adding the &&, so it didn't dawn
> on me to try removing them.  (I worked around it by unmounting it (an
> alias) and trying the back-up again.)

I don't follow what this is about, particularly each line having (or
not having) a &&.

Cheers,
David.

Reply via email to