From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mx.groups.io with SMTP id smtpd.web11.25.1586197997643543892 for ; Mon, 06 Apr 2020 11:33:17 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=gQHzzGsp; spf=pass (domain: intel.com, ip: 134.134.136.65, mailfrom: ashley.e.desimone@intel.com) IronPort-SDR: VRKL8WDbBjLabr9WlNkjpEBbvYw5RcUeioa/9sLZZFPdxGEGv9CYj1TbAyamPdemOsEPziTmJd 2xZe1V05LUmA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Apr 2020 11:33:09 -0700 IronPort-SDR: OgRb4FuexH2GPdo+zsv2jWAQq2Txzyx2RgMyQoC9bT+BtC2tULpS46ho2MYeB59u/MAPCW0Ixw 8bm8mJ6wuBJg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,352,1580803200"; d="scan'208";a="296729785" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by FMSMGA003.fm.intel.com with ESMTP; 06 Apr 2020 11:33:06 -0700 Received: from fmsmsx154.amr.corp.intel.com (10.18.116.70) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 6 Apr 2020 11:33:06 -0700 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by FMSMSX154.amr.corp.intel.com (10.18.116.70) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 6 Apr 2020 11:33:06 -0700 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (104.47.36.56) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 6 Apr 2020 11:33:03 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HMlvuxYGIhACYDE5LP2Eujf19IhGrFzlDYlhDdGD7yDjAXQXOS+jkLFpXEkgIW7H8us0QSIWC6Lq6486OLHMQG0QlgLKJFgkajFzv4Jdha0JIPoNmH4yZ77XIxEaXvzB0M9zBIqUo7OwiB1ttoZsVuEe0JeZl2iZPeFMM1Ruwq8PRYPKAChfqp9ZvHngIPf8cEHOXAvd171aFKdCYV71BEY2GRUi+pkNJXCBMvx9eykTuaLMmSYKCRPl/YH5mgOm/v89IjyDR4g0I4l8PoeQCinNdQq5eeB4j/hMZgXl4BDVd7yMJkDID1xqFTp4Hah6iQI6yZltHSuWzmH8HYSs+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wtx7PzRADSwBhlpdV8/N8COarVgC1b2cs10pKImgXbk=; b=oHugGOakVX9T/6BMV4q3+HlB9ttsu+jgSNP3fiGDdUI4BshmAVNcGf0Pp0fxbyOHEQJDEmAHuqVA0lfQCWuQLHx0vRrdlpSj3J4rfoxH2EsKiP4Y9633SR1N01nynuQwKdh+E3/IzwQ80Uwhw+KeuHZa7wIze1w0foxrsjksAWW2U/CAWvtpQheRo+fPF0Df7QIWQ+t7fcba7T3LzYInqyrexZ9/MXvZCe8CiCCmdItGfICt9VCzZ4esCStpyXlJEwq0v+21fADrlQx9vN4cIYwU71CEy1sboe48vZkmLO+eQLRQ68Dw8j6qXm3W3/FP85nXxAukq+7kq/DWwsEeAg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wtx7PzRADSwBhlpdV8/N8COarVgC1b2cs10pKImgXbk=; b=gQHzzGspBG4TsvT26xyalJEfr4Zuvxl+D8o478Q64a0fHF1e++vhDNTiJtSeuiNsaxhrhbvRU4zkyB3sZUwDRj2unPSoz5WbyM6hfhK0gzhkCY4BHjyZj2KDUMObnIbEIGRrwu95iJUcMQQT/DDLKG7kzfukOQt0rWUA5plYDqk= Received: from DM6PR11MB3628.namprd11.prod.outlook.com (2603:10b6:5:144::25) by DM6PR11MB4346.namprd11.prod.outlook.com (2603:10b6:5:1dd::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.15; Mon, 6 Apr 2020 18:32:46 +0000 Received: from DM6PR11MB3628.namprd11.prod.outlook.com ([fe80::5904:e7d9:f64d:9a7e]) by DM6PR11MB3628.namprd11.prod.outlook.com ([fe80::5904:e7d9:f64d:9a7e%3]) with mapi id 15.20.2878.021; Mon, 6 Apr 2020 18:32:46 +0000 From: "Ashley E Desimone" To: "Desimone, Nathaniel L" , "devel@edk2.groups.io" CC: "Pandya, Puja" , "Bjorge, Erik C" , "Agyeman, Prince" , "Bret Barkelew" , Philippe Mathieu-Daude Subject: Re: [edk2-staging/EdkRepo] [PATCH V2 0/3] EdkRepo: Command completion in bash/zsh Thread-Topic: [edk2-staging/EdkRepo] [PATCH V2 0/3] EdkRepo: Command completion in bash/zsh Thread-Index: AQHWChKcoBiQttHB5kWGusfO2B0pV6hsbxIg Date: Mon, 6 Apr 2020 18:32:46 +0000 Message-ID: References: <20200403234932.2497-1-nathaniel.l.desimone@intel.com> In-Reply-To: <20200403234932.2497-1-nathaniel.l.desimone@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.2.0.6 dlp-reaction: no-action dlp-product: dlpe-windows authentication-results: spf=none (sender IP is ) smtp.mailfrom=ashley.e.desimone@intel.com; x-originating-ip: [192.55.52.205] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e88e0671-9f71-4ebe-0df6-08d7da58e753 x-ms-traffictypediagnostic: DM6PR11MB4346: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 0365C0E14B x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR11MB3628.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(10019020)(376002)(396003)(366004)(39860400002)(136003)(346002)(53546011)(2906002)(7696005)(54906003)(8936002)(4326008)(8676002)(110136005)(81166006)(81156014)(86362001)(316002)(55016002)(66556008)(66946007)(71200400001)(66476007)(66446008)(64756008)(186003)(33656002)(76116006)(6506007)(9686003)(26005)(52536014)(478600001)(5660300002);DIR:OUT;SFP:1102; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 06kiz5SJR5uJe04qzbufM0wkC7abP+ZCVLsXDPtMx9svXAGzrn9n1tX3KWCvNw5PPBTZxSdvrZGyAhddbPprHhg7OzfFAw8hSRUpZOIkMmb+6JZT3d5YOeorSyTa4dgu1LRodYd2NCIXSUvRiS68Cd+XRnZ5lyl4D0+7L3TYQ3DLNjU7npBM8dTf99WCUMlQr7xbE4tA6QHwofQKYYTVgKPexa4ntmSlT/BeiABO+EQyEPvL3INYU8YZ18qh8l+xHATQz9XyBLxPG5v+KNfvg1Rb+13rcfQ16LOUnJX3u0O8wP6pDth16EIE6gy25pX1frCEZlV0Hq72erlF8QdowTbOhoumeeiD2tio48fo7FaF6EOJk9YgNgB4FAX29vmpYtWP31OJH7vOczqDEwx0gNrvksfBEjhuAEySZnM0z9royLf9CYXhRqjKobwK97Wm x-ms-exchange-antispam-messagedata: XO43W8H32UUc9yQM/USqBmC6lZ+BJg2kAoJXnxjOb32as5kN+MUxlhsOAfoE+AwEUb2LApNVJFpxVxNQJNK/0ptTXYk6RxZUooAspBBuHT0gqMfFf5FdX+GLUFxaJLIvkJLg0HXASMh4Z71yjEY1xA== MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: e88e0671-9f71-4ebe-0df6-08d7da58e753 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Apr 2020 18:32:46.7902 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: PnZLThb12d1oD0T4Du5/JS8DxZ1aWfmI/tC9AzFVJk/lrQae1JfYL8SpmlU4lPedPqBpZXAMQEVuQ539XwoMq9MU6bJ3GziPwbwE2LIbkFM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4346 Return-Path: ashley.e.desimone@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable For the series: Reviewed-by: Ashley DeSimone -----Original Message----- From: Desimone, Nathaniel L =20 Sent: Friday, April 3, 2020 4:49 PM To: devel@edk2.groups.io Cc: Desimone, Ashley E ; Pandya, Puja ; Bjorge, Erik C ; Agyeman, Prince = ; Bret Barkelew ; Ph= ilippe Mathieu-Daude Subject: [edk2-staging/EdkRepo] [PATCH V2 0/3] EdkRepo: Command completion = in bash/zsh Changes since V1: - Now uses the new combinations_in_manifest() function introduced by Erik's patch series. This patch series adds command completions (also referred to as [TAB] compl= etions) to EdkRepo. It also adds the currently checked out branch combinati= on to the command prompt. This is a significant quality of life improvement= for EdkRepo's users. The bash and zsh shells are supported. The reason why bash and zsh were cho= osen is based on their popularity in the UNIX world. zsh is the default shell on macOS and most contemporary Linux distributions= use bash as the default shell. Git for Windows also uses bash. Performance was a strong consideration in the design of this feature. Since= EdkRepo has become a fairly large amount of Python code with lots of depen= dencies, the "boot time" for the Python interperter to load and execute the= EdkRepo entrypoint is approximately 1-2 seconds. A 2 second delay on TAB c= ompletion would not be a good user experience. To mitigate this, instead of enumerating and instantiating all the command = classes to generate the list of EdkRepo sub-commands every time the user pr= esses the TAB key, this is done once and stored in a auto-generated shell s= cript at installation time. This way, the shell has all the information nee= ded for static completions without having to invoke the Python interperter = at all. There are cases where TAB completions need some dynamic data. For example, completing the 3rd parameter after "edkrepo checkout " require= s the shell to know the list of branch combinations, this requires parsing = the manifest XML. command_completion_edkrepo.py provides a means for the shell to get that ty= pe of data. A new command_completion_edkrepo.py script has been added for t= his purpose. command_completion_edkrepo.py is callable by the shell when dynamic complet= ion data is needed. command_completion_edkrepo.py has been tuned to limit imports as much as po= ssible so that it executes quickly. command_completion_edkrepo.py is also used to retrieve the currently checke= d out branch combination so that it can be added to the prompt. For perform= ance considerations, this operation is only done iff the present working di= rectory was changed by the last command the shell executed. Cc: Ashley DeSimone Cc: Puja Pandya Cc: Erik Bjorge Cc: Prince Agyeman Cc: Bret Barkelew Cc: Philippe Mathieu-Daude Signed-off-by: Nate DeSimone Nate DeSimone (3): EdkRepo: Generate command completion scripts EdkRepo: Add command completion setup to install.py EdkRepo: Add command completion setup to Windows installer edkrepo/command_completion_edkrepo.py | 87 ++++++ edkrepo/edkrepo_cli.py | 61 +++- .../EdkRepoInstaller/InstallWorker.cs | 212 +++++++++++-- .../EdkRepoInstaller/InstallerStrings.cs | 44 ++- .../Vendor/win_edkrepo_prompt.sh | 60 ++++ edkrepo_installer/linux-scripts/install.py | 285 +++++++++++++++++- setup.py | 8 +- 7 files changed, 730 insertions(+), 27 deletions(-) create mode 100644 ed= krepo/command_completion_edkrepo.py create mode 100644 edkrepo_installer/Vendor/win_edkrepo_prompt.sh -- 2.26.0.windows.1