mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 09:08:48 +01:00
@@ -7,10 +7,16 @@ import { exec } from 'child_process';
|
|||||||
import { promisify } from 'util';
|
import { promisify } from 'util';
|
||||||
import * as fs from 'fs/promises';
|
import * as fs from 'fs/promises';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
|
import { platform } from 'os';
|
||||||
|
|
||||||
|
if (platform() === 'win32') {
|
||||||
|
console.error('\x1b[31mThis command is not supported on Windows\x1b[0m');
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
const shortDescriptions: Map<string, string> = new Map([
|
const shortDescriptions: Map<string, string> = new Map([
|
||||||
['.', 'Source a file'],
|
['.', 'Source a file'],
|
||||||
// [':', ''],
|
[':', 'Null command'],
|
||||||
['alias', 'Define or view aliases'],
|
['alias', 'Define or view aliases'],
|
||||||
['autoload', 'Autoload a function'],
|
['autoload', 'Autoload a function'],
|
||||||
['bg', 'Put a job in the background'],
|
['bg', 'Put a job in the background'],
|
||||||
@@ -19,85 +25,85 @@ const shortDescriptions: Map<string, string> = new Map([
|
|||||||
['builtin', 'Executes a builtin'],
|
['builtin', 'Executes a builtin'],
|
||||||
['bye', 'Exit the shell'],
|
['bye', 'Exit the shell'],
|
||||||
['chdir', 'Change the current directory'],
|
['chdir', 'Change the current directory'],
|
||||||
// ['comparguments', ''],
|
['comparguments', 'Complete arguments'],
|
||||||
// ['compcall', ''],
|
['compcall', 'Complete call'],
|
||||||
// ['compctl', ''],
|
['compctl', 'Complete control'],
|
||||||
// ['compdescribe', ''],
|
['compdescribe', 'Complete describe'],
|
||||||
// ['compfiles', ''],
|
['compfiles', 'Complete files'],
|
||||||
// ['compgroups', ''],
|
['compgroups', 'Complete groups'],
|
||||||
// ['compquote', ''],
|
['compquote', 'Complete quote'],
|
||||||
// ['comptags', ''],
|
['comptags', 'Complete tags'],
|
||||||
// ['comptry', ''],
|
['comptry', 'Complete try'],
|
||||||
// ['compvalues', ''],
|
['compvalues', 'Complete values'],
|
||||||
['continue', 'Resume the next loop iteration'],
|
['continue', 'Resume the next loop iteration'],
|
||||||
['declare', 'Set or display parameter attributes/values'],
|
['declare', 'Set or display parameter attributes/values'],
|
||||||
['dirs', 'Interact with directory stack'],
|
['dirs', 'Interact with directory stack'],
|
||||||
['disable', 'Disable shell features'],
|
['disable', 'Disable shell features'],
|
||||||
['disown', 'Remove job from job table'],
|
['disown', 'Remove job from job table'],
|
||||||
['echo', 'Write on standard output'],
|
['echo', 'Write on standard output'],
|
||||||
// ['echotc', ''],
|
['echotc', 'Echo terminal capabilities'],
|
||||||
['enable', 'Enable shell features'],
|
['enable', 'Enable shell features'],
|
||||||
['eval', 'Execute arguments in shell'],
|
['eval', 'Execute arguments in shell'],
|
||||||
['exec', 'Replace shell with command'],
|
['exec', 'Replace shell with command'],
|
||||||
['exit', 'Exit the shell'],
|
['exit', 'Exit the shell'],
|
||||||
['export', 'Export to environment'],
|
['export', 'Export to environment'],
|
||||||
['false', 'Return exit status of 1'],
|
['false', 'Return exit status of 1'],
|
||||||
// ['fc', ''],
|
['fc', 'Fix command'],
|
||||||
// ['fg', ''],
|
['fg', 'Put a job in the foreground'],
|
||||||
// ['float', ''],
|
['float', 'Floating point arithmetic'],
|
||||||
// ['functions', ''],
|
['functions', 'List functions'],
|
||||||
// ['getcap', ''],
|
['getcap', 'Get capabilities'],
|
||||||
// ['getopts', ''],
|
['getopts', 'Parse positional parameters'],
|
||||||
// ['hash', ''],
|
['hash', 'Remember command locations'],
|
||||||
// ['history', ''],
|
['history', 'Command history'],
|
||||||
// ['integer', ''],
|
['integer', 'Integer arithmetic'],
|
||||||
// ['jobs', ''],
|
['jobs', 'List active jobs'],
|
||||||
// ['kill', ''],
|
['kill', 'Send a signal to a process'],
|
||||||
// ['let', ''],
|
['let', 'Evaluate arithmetic expression'],
|
||||||
// ['limit', ''],
|
['limit', 'Set or display resource limits'],
|
||||||
// ['local', ''],
|
['local', 'Create a local variable'],
|
||||||
// ['logout', ''],
|
['logout', 'Exit the shell'],
|
||||||
// ['noglob', ''],
|
['noglob', 'Disable filename expansion'],
|
||||||
// ['popd', ''],
|
['popd', 'Remove directory from stack'],
|
||||||
// ['print', ''],
|
['print', 'Print arguments'],
|
||||||
// ['printf', ''],
|
['printf', 'Format and print data'],
|
||||||
// ['pushd', ''],
|
['pushd', 'Add directory to stack'],
|
||||||
// ['pushln', ''],
|
['pushln', 'Push arguments onto the buffer'],
|
||||||
['pwd', 'Print working directory'],
|
['pwd', 'Print working directory'],
|
||||||
// ['r', ''],
|
['r', 'Re-execute command'],
|
||||||
// ['readonly', ''],
|
['readonly', 'Mark variables as read-only'],
|
||||||
// ['rehash', ''],
|
['rehash', 'Recompute command hash table'],
|
||||||
// ['sched', ''],
|
['sched', 'Schedule commands'],
|
||||||
// ['setcap', ''],
|
['setcap', 'Set capabilities'],
|
||||||
// ['shift', ''],
|
['shift', 'Shift positional parameters'],
|
||||||
// ['source', ''],
|
['source', 'Source a file'],
|
||||||
// ['stat', ''],
|
['stat', 'Display file status'],
|
||||||
// ['test', ''],
|
['test', 'Evaluate a conditional expression'],
|
||||||
// ['times', ''],
|
['times', 'Display shell times'],
|
||||||
// ['trap', ''],
|
['trap', 'Set signal handlers'],
|
||||||
['true', 'Return exit status of 0'],
|
['true', 'Return exit status of 0'],
|
||||||
// ['ttyctl', ''],
|
['ttyctl', 'Control terminal attributes'],
|
||||||
// ['type', ''],
|
['type', 'Describe a command'],
|
||||||
['typeset', 'Set or display parameter attributes/values'],
|
['typeset', 'Set or display parameter attributes/values'],
|
||||||
// ['ulimit', ''],
|
['ulimit', 'Set or display resource limits'],
|
||||||
// ['umask', ''],
|
['umask', 'Set file creation mask'],
|
||||||
['unalias', 'Removes aliases'],
|
['unalias', 'Removes aliases'],
|
||||||
// ['unfunction', ''],
|
['unfunction', 'Remove function definition'],
|
||||||
// ['unhash', ''],
|
['unhash', 'Remove command from hash table'],
|
||||||
// ['unlimit', ''],
|
['unlimit', 'Remove resource limits'],
|
||||||
// ['unset', ''],
|
['unset', 'Unset values and attributes of variables'],
|
||||||
// ['unsetopt', ''],
|
['unsetopt', 'Unset shell options'],
|
||||||
// ['vared', ''],
|
['vared', 'Edit shell variables'],
|
||||||
// ['whence', ''],
|
['whence', 'Locate a command'],
|
||||||
// ['where', ''],
|
['where', 'Locate a command'],
|
||||||
// ['which', ''],
|
['which', 'Locate a command'],
|
||||||
// ['zcompile', ''],
|
['zcompile', 'Compile functions'],
|
||||||
// ['zformat', ''],
|
['zformat', 'Format strings'],
|
||||||
// ['zftp', ''],
|
['zftp', 'Zsh FTP client'],
|
||||||
// ['zparseopts', ''],
|
['zparseopts', 'Parse options'],
|
||||||
// ['zprof', ''],
|
['zprof', 'Zsh profiler'],
|
||||||
// ['zsocket', ''],
|
['zsocket', 'Zsh socket interface'],
|
||||||
// ['zstyle', ''],
|
['zstyle', 'Define styles']
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const execAsync = promisify(exec);
|
const execAsync = promisify(exec);
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user