From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from ma1-aaemail-dr-lapp01.apple.com (ma1-aaemail-dr-lapp01.apple.com [17.171.2.60]) by mx.groups.io with SMTP id smtpd.web09.20706.1581473315198226954 for ; Tue, 11 Feb 2020 18:08:35 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@apple.com header.s=20180706 header.b=ixrQ1FQ9; spf=pass (domain: apple.com, ip: 17.171.2.60, mailfrom: afish@apple.com) Received: from pps.filterd (ma1-aaemail-dr-lapp01.apple.com [127.0.0.1]) by ma1-aaemail-dr-lapp01.apple.com (8.16.0.27/8.16.0.27) with SMTP id 01C1xm8O001792; Tue, 11 Feb 2020 18:08:30 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apple.com; h=sender : content-type : content-transfer-encoding : from : mime-version : subject : date : message-id : references : cc : in-reply-to : to; s=20180706; bh=G1ybeZ8vLhczd1Zovk6tBQ6LxD2dAX7oqkvbu8auWA4=; b=ixrQ1FQ9718XdwA/Yh6fEnVa7vVfh/eF7ciouzf55uCD//9xTNxtEaItVH5HnJztMbJz aQZfGBwxnA2NqUapoHXDMFQX5hA5vEox7GunMlI4gINQanOWdxLM2Mjjzz10Gmx3LCoK XZmc+M0FqYyavJtB7cGFBM+Yjpn0PL0aX+hsaqKzy1yH3EvKpkOESIVvrswdKSkfv0Yv A3qBMYU4zQWLrUzwQvwnTaaF0vDZQv9tCwss5AMuQPXxOSgPt+4lFtusD9r1//M2zeQU sk5pg3Jj0QYMNCCLZmmDxhCbxLyrQRPq8/ODnubMn6m00ULd6SBT7thR2xN4VmJBOnam ug== Received: from rn-mailsvcp-mta-lapp03.rno.apple.com (rn-mailsvcp-mta-lapp03.rno.apple.com [10.225.203.151]) by ma1-aaemail-dr-lapp01.apple.com with ESMTP id 2y1vh86amx-5 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Tue, 11 Feb 2020 18:08:30 -0800 Received: from rn-mailsvcp-mmp-lapp02.rno.apple.com (rn-mailsvcp-mmp-lapp02.rno.apple.com [17.179.253.15]) by rn-mailsvcp-mta-lapp03.rno.apple.com (Oracle Communications Messaging Server 8.1.0.1.20190704 64bit (built Jul 4 2019)) with ESMTPS id <0Q5K00LOFGM60UE0@rn-mailsvcp-mta-lapp03.rno.apple.com>; Tue, 11 Feb 2020 18:08:30 -0800 (PST) Received: from process_milters-daemon.rn-mailsvcp-mmp-lapp02.rno.apple.com by rn-mailsvcp-mmp-lapp02.rno.apple.com (Oracle Communications Messaging Server 8.1.0.1.20190704 64bit (built Jul 4 2019)) id <0Q5K00I00G6RPD00@rn-mailsvcp-mmp-lapp02.rno.apple.com>; Tue, 11 Feb 2020 18:08:30 -0800 (PST) X-Va-A: X-Va-T-CD: 9d404913f2431a8cdd0e74c90ec06364 X-Va-E-CD: 91db522e7388f410379e3fe8b4f1f0e3 X-Va-R-CD: bf9a8acd8921a8c75f1f92d3890dc214 X-Va-CD: 0 X-Va-ID: 79e3376a-d8c2-47d6-a20e-b22061d6be98 X-V-A: X-V-T-CD: 9d404913f2431a8cdd0e74c90ec06364 X-V-E-CD: 91db522e7388f410379e3fe8b4f1f0e3 X-V-R-CD: bf9a8acd8921a8c75f1f92d3890dc214 X-V-CD: 0 X-V-ID: c74de849-0897-480e-94a3-bf50218fc15a X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.572 definitions=2020-02-11_07:2020-02-11,2020-02-11 signatures=0 Received: from [17.234.72.233] (unknown [17.234.72.233]) by rn-mailsvcp-mmp-lapp02.rno.apple.com (Oracle Communications Messaging Server 8.1.0.1.20190704 64bit (built Jul 4 2019)) with ESMTPSA id <0Q5K000FVGM4RT50@rn-mailsvcp-mmp-lapp02.rno.apple.com>; Tue, 11 Feb 2020 18:08:30 -0800 (PST) Sender: afish@apple.com From: "Andrew Fish" MIME-version: 1.0 (1.0) Subject: Re: [edk2-devel] Shell feature? Date: Tue, 11 Feb 2020 18:08:27 -0800 Message-id: <1FCC7027-A508-4891-8400-3CDD3B371E34@apple.com> References: Cc: "devel@edk2.groups.io" , "jim.dailey@dell.com" , "tim.lewis@insyde.com" In-reply-to: To: "Carsey, Jaben" X-Mailer: iPhone Mail (17D50) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2020-02-11_07:,, signatures=0 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: quoted-printable Jaben, My example was confusing, but my use case was to put this code in a librar= y that adds a command. So after I register the command I=E2=80=99d like to = register the file type to be processed by it. Making an alias for an external command could be a different feature? > On Feb 11, 2020, at 5:30 PM, Carsey, Jaben wrot= e: >=20 > =EF=BB=BFAndrew >=20 > You can already add a command via a driver (including a driver's library= ). Check into the Dynamic Commands in the shell spec. >=20 > Associating a file type with a command, basically if the first thing on = the command line is a file of that type, then prepend the command and re-pr= ocess the line, is very doable. It's almost like the alias feature that alr= eady exists. >=20 > I do agree with Tim that we should do a spec update, but concurrent deve= lopment of code and spec seems required to prevent re-doing the spec. >=20 > -Jaben >=20 >> -----Original Message----- >> From: devel@edk2.groups.io On Behalf Of Jim >> Dailey >> Sent: Tuesday, February 11, 2020 1:31 PM >> To: devel@edk2.groups.io >> Cc: tim.lewis@insyde.com; afish@apple.com >> Subject: Re: [edk2-devel] Shell feature? >>=20 >> Andrew, >>=20 >> Granted such a feature would be nice, but it seems like it might be a f= air >> amount of trouble just to avoid typing "python3", which could be aliase= d to >> something as short a "p". >>=20 >> Jim >>=20 >> -----Original Message----- >> From: devel@edk2.groups.io On Behalf Of Tim >> Lewis >> Sent: Tuesday, February 11, 2020 2:28 PM >> To: devel@edk2.groups.io; afish@apple.com >> Subject: Re: [edk2-devel] Shell feature? >>=20 >>=20 >> [EXTERNAL EMAIL] >>=20 >> Andrew -- >>=20 >> I think this is a good idea, but I think this is probably a shell spec = issue >> because I don't want competing, incompatible implementations. >>=20 >> A few other issues: I think there is a persistence issue (similar to sh= ell >> variables) so that the change could be installed and survive a reboot. = I also >> think there can be a simple shell command that manages extensions (so t= hat >> they can be installed by a script) >>=20 >> Tim >>=20 >> -----Original Message----- >> From: devel@edk2.groups.io On Behalf Of Andrew >> Fish via Groups.Io >> Sent: Monday, February 10, 2020 12:12 PM >> To: devel@edk2.groups.io >> Subject: [edk2-devel] Shell feature? >>=20 >> I wanted to start a conversation on the mailing list prior to writing u= p a BZ, to >> make sure I'm not missing anything, or in case there is a better way to >> implement this. >>=20 >> I was thinking it would be good to have a Shell API that lets you assoc= iate a >> file type with an internal or external shell command. The Idea would be= to >> pre-pend the internal/external shell command to the file name and also = pass >> the arguments. >>=20 >> So this: >> fs0:>dump.py 1 2 3 >>=20 >> Becomes: >> fs0:>python3.efi dump.py 1 2 3 >>=20 >> Basically you just need an API like: >>=20 >> ShellAddScriptingLanguage (L".py", L"python3.efi"); >>=20 >> Seems like this could just plug into the Shell via a ShellExecute(). So= for >> example you could make Python a UEFI Shell command via a library and th= at >> library constructor could also teach the shell that a .py file could be= an >> executable? >>=20 >> Thanks, >>=20 >> Andrew Fish >>=20 >>=20 >>=20 >>=20 >>=20 >>=20 >>=20 >>=20 >=20