mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 20:26:08 +00:00
add builtin fish arg/description/documentation to suggestion (#243271)
This commit is contained in:
@@ -3,16 +3,11 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { exec } from 'child_process';
|
||||
import { promisify } from 'util';
|
||||
import * as fs from 'fs/promises';
|
||||
import * as path from 'path';
|
||||
import { platform } from 'os';
|
||||
import { checkWindows, execAsync, copyright } from './terminalScriptHelpers';
|
||||
|
||||
if (platform() === 'win32') {
|
||||
console.error('\x1b[31mThis command is not supported on Windows\x1b[0m');
|
||||
process.exit(1);
|
||||
}
|
||||
checkWindows();
|
||||
|
||||
const latestZshVersion = 5.9;
|
||||
|
||||
@@ -126,14 +121,14 @@ const shortDescriptions: Map<string, string> = new Map([
|
||||
['ztcp', 'Manipulate TCP sockets'],
|
||||
]);
|
||||
|
||||
const execAsync = promisify(exec);
|
||||
|
||||
interface ICommandDetails {
|
||||
description: string;
|
||||
args: string | undefined;
|
||||
shortDescription?: string;
|
||||
}
|
||||
|
||||
let zshBuiltinsCommandDescriptionsCache = new Map<string, ICommandDetails>();
|
||||
|
||||
async function createCommandDescriptionsCache(): Promise<void> {
|
||||
const cachedCommandDescriptions: Map<string, { shortDescription?: string; description: string; args: string | undefined }> = new Map();
|
||||
let output = '';
|
||||
@@ -259,10 +254,4 @@ const main = async () => {
|
||||
}
|
||||
};
|
||||
|
||||
const copyright = `
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/`;
|
||||
|
||||
main();
|
||||
|
||||
Reference in New Issue
Block a user