Dne čtvrtek 18. března 2021 14:02:14 CET, Anton Aylward napsal(a):
On 2021-03-18 7:09 a.m., David T-G wrote:
I don't like that code at all. It's guaranteed to succeed, whether .alias exists with a non-zero length and parses happily, or .alias doesn't exist, or .alias exists AND HITS A FAILURE, which doesn't make sense.
Oh, it DOES make sense. It HAS to succeed since this is in .bashrc. This is the bash start-up script. If that fails then the bash startup aborts.
Really? As any other BASH script, if You'd have in ~/.bashrc e.g. some custom function with syntactical error or so, at startup You get error about particular line and then the execution continues. I know it isn't optimal, but it seems to be working.
Think about the consequences of that in various contexts and you'll realise why that can't be allowed to happen.
Any example? Nothing cames to my mind... :( -- Vojtěch Zeisek https://trapa.cz/ Komunita openSUSE GNU/Linuxu Community of the openSUSE GNU/Linux https://www.opensuse.org/