Date: Tue, 09 Jul 2019 20:24:30 -0700 From: L A Walsh <b...@tlinx.org> Message-ID: <5d255a6e.4060...@tlinx.org>
| Why? What makes clarity "horrible". It isn't the clarity (if you call it that, it is really obscurity as no-one else can read your scripts/commands and have any idea what they really do) but the using of aliases that way to achieve it. You could easily do what you want, much more effectively, and with less disruption using functions instead ... with a function, the conversion from "Export" to "-x" would only happen inside the "my" function, so you would be able to just use "export" (and even allow abbreviations) if you wanted - without it conflicting with "export" used as a command. Aliases are disgusting, and always have been - they remain really only because POSIX says they should (because David Korn thought he needed to copy that bit of csh which needed to do things this way because of other limitations in the underlying implementation) - and because of other dumb rules there are just a few things that functions cannot do, which aliases can ... but in those cases the best solution is to write a function with a different name (which is always the sole problem) and then use an alias to make the name you want to use to the name that will work for the function, and no more than that. kre