src/vs/platform/extensionManagement/common/extensionManagementCLIService.ts/ExtensionManagementCLIService/listExtensions
class ExtensionManagementCLIService:	public async listExtensions(showVersions: boolean, category?: string, output: CLIOutput = console): Promise<void> {
		let extensions = await this.extensionManagementService.getInstalled(ExtensionType.User);
		const categories = EXTENSION_CATEGORIES.map(c => c.toLowerCase());
		if (category && category !== '') {
			if (categories.indexOf(category.toLowerCase()) < 0) {
				output.log('Invalid category please enter a valid category. To list valid categories run --category without a category specified');
				return;
			}
			extensions = extensions.filter(e => {
				if (e.manifest.categories) {
					const lowerCaseCategories: string[] = e.manifest.categories.map(c => c.toLowerCase());
					return lowerCaseCategories.indexOf(category.toLowerCase()) > -1;
				}
				return false;
			});
		} else if (category === '') {
			output.log('Possible Categories: ');
			categories.forEach(category => {
				output.log(category);
			});
			return;
		}
		if (this.location) {
			output.log(localize('listFromLocation', "Extensions installed on {0}:", this.location));
		}

		extensions = extensions.sort((e1, e2) => e1.identifier.id.localeCompare(e2.identifier.id));
		let lastId: string | undefined = undefined;
		for (const extension of extensions) {
			if (lastId !== extension.identifier.id) {
				lastId = extension.identifier.id;
				output.log(getId(extension.manifest, showVersions));
			}
		}
	}