I have the following problem:
I have many test scripts that are currently running using MKS Toolkit. We managed to run those scripts using the mingw shell (msys) but there are other scripts that make use of some alias
es that are built-in MKS Toolkit and not in bash.
The problem is that nobody wants to change those scripts, not even automatically by using a script. This means that I should define and use those aliases. I tried defining the aliases in the "/etc/profile" file of msys shell but without any success. I also tried to use shopt -s expand_aliases
(in "/etc/profile") but that doesn't work either.
Could someone share an idea on how this could be done. Mind that the existing scripts will have to remain the same.
Any thoughts or ideas are welcome.
Thanks
This answer gave me the solution. It involves defining the variable
BASH_ENV
before executingBASH_ENV will point to a script which sets the environment of the shell. In my case, to export the
alias
es and also the functions needed the script looks like this: