Jim,
Sorry I forgot to hit send on this....
We have scripts that run under OS and the EFI Shell that we use for debugging. So like Python in the OS you can just type the name of the script and it works, so folks expect the same behavior at the EFI shell :).
Also as I mentioned in our case the interpreter was built into the shell. In that case you don't have pathing issues to launch Python. It is a lot easier to just distribute the UEFI Shell binary vs. forcing folks to have a bunch of files in specific directories to get things to work.
Maybe we should futz around with the UEFI Python and wrap it in a lib so it can optionally get built into the UEFI Shell binary.
Thanks,
Andrew Fish
Andrew,Granted such a feature would be nice, but it seems like it might be afair amount of trouble just to avoid typing "python3", which could bealiased to something as short a "p".Jim-----Original Message-----From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Tim LewisSent: Tuesday, February 11, 2020 2:28 PMTo: devel@edk2.groups.io; afish@apple.comSubject: Re: [edk2-devel] Shell feature?[EXTERNAL EMAIL] Andrew --I think this is a good idea, but I think this is probably a shell spec issuebecause I don't want competing, incompatible implementations.A few other issues: I think there is a persistence issue (similar to shellvariables) so that the change could be installed and survive a reboot. Ialso think there can be a simple shell command that manages extensions (sothat they can be installed by a script)Tim-----Original Message-----From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Andrew Fishvia Groups.IoSent: Monday, February 10, 2020 12:12 PMTo: devel@edk2.groups.ioSubject: [edk2-devel] Shell feature?I wanted to start a conversation on the mailing list prior to writing up aBZ, to make sure I'm not missing anything, or in case there is a better wayto implement this. I was thinking it would be good to have a Shell API that lets you associatea file type with an internal or external shell command. The Idea would be topre-pend the internal/external shell command to the file name and also passthe arguments.So this:fs0:>dump.py 1 2 3Becomes:fs0:>python3.efi dump.py 1 2 3Basically you just need an API like:ShellAddScriptingLanguage (L".py", L"python3.efi");Seems like this could just plug into the Shell via a ShellExecute(). So forexample you could make Python a UEFI Shell command via a library and thatlibrary constructor could also teach the shell that a .py file could be anexecutable?Thanks,Andrew Fish