Skip to content

Commit a9e28d5

Browse files
authored
Merge pull request microsoft#159626 from microsoft/tyriar/159618
Move ITerminalInstance.runRecent into its own file
2 parents fa9d5ab + 89c00c5 commit a9e28d5

File tree

4 files changed

+343
-278
lines changed

4 files changed

+343
-278
lines changed

src/vs/workbench/contrib/terminal/browser/terminal.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import { Orientation } from 'vs/base/browser/ui/splitview/splitview';
77
import { Event } from 'vs/base/common/event';
88
import { IDisposable } from 'vs/base/common/lifecycle';
9+
import { OperatingSystem } from 'vs/base/common/platform';
910
import { URI } from 'vs/base/common/uri';
1011
import { FindReplaceState } from 'vs/editor/contrib/find/browser/findState';
1112
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
@@ -456,6 +457,7 @@ export interface ITerminalInstance {
456457
readonly workspaceFolder?: IWorkspaceFolder;
457458
readonly cwd?: string;
458459
readonly initialCwd?: string;
460+
readonly os?: OperatingSystem;
459461
readonly capabilities: ITerminalCapabilityStore;
460462

461463
readonly statusList: ITerminalStatusList;
@@ -761,8 +763,12 @@ export interface ITerminalInstance {
761763
* @param addNewLine Whether to add a new line to the text being sent, this is normally required
762764
* to run a command in the terminal. The character(s) added are \n or \r\n depending on the
763765
* platform. This defaults to `true`.
766+
* @param bracketedPasteMode Whether to wrap the text in the bracketed paste mode sequence when
767+
* it's enabled. When true, the shell will treat the text as if it were pasted into the shell,
768+
* this may for example select the text and it will also ensure that the text will not be
769+
* interpreted as a shell keybinding.
764770
*/
765-
sendText(text: string, addNewLine: boolean): Promise<void>;
771+
sendText(text: string, addNewLine: boolean, bracketedPasteMode?: boolean): Promise<void>;
766772

767773
/**
768774
* Sends a path to the terminal instance, preparing it as needed based on the detected shell
@@ -776,6 +782,14 @@ export interface ITerminalInstance {
776782
*/
777783
sendPath(originalPath: string, addNewLine: boolean): Promise<void>;
778784

785+
/**
786+
* Takes a path and returns the properly escaped path to send to a given shell. On Windows, this
787+
* includes trying to prepare the path for WSL if needed.
788+
*
789+
* @param originalPath The path to be escaped and formatted.
790+
*/
791+
preparePathForShell(originalPath: string): Promise<string>;
792+
779793
/** Scroll the terminal buffer down 1 line. */ scrollDownLine(): void;
780794
/** Scroll the terminal buffer down 1 page. */ scrollDownPage(): void;
781795
/** Scroll the terminal buffer to the bottom. */ scrollToBottom(): void;

src/vs/workbench/contrib/terminal/browser/terminalIcons.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,7 @@ export const terminalDecorationMark = registerIcon('terminal-decoration-mark', C
1919
export const terminalDecorationIncomplete = registerIcon('terminal-decoration-incomplete', Codicon.circle, localize('terminalDecorationIncomplete', 'Icon for a terminal decoration of a command that was incomplete.'));
2020
export const terminalDecorationError = registerIcon('terminal-decoration-error', Codicon.errorSmall, localize('terminalDecorationError', 'Icon for a terminal decoration of a command that errored.'));
2121
export const terminalDecorationSuccess = registerIcon('terminal-decoration-success', Codicon.circleFilled, localize('terminalDecorationSuccess', 'Icon for a terminal decoration of a command that was successful.'));
22+
23+
export const commandHistoryRemoveIcon = registerIcon('terminal-command-history-remove', Codicon.close, localize('terminalCommandHistoryRemove', 'Icon for removing a terminal command from command history.'));
24+
export const commandHistoryOutputIcon = registerIcon('terminal-command-history-output', Codicon.output, localize('terminalCommandHistoryOutput', 'Icon for viewing output of a terminal command.'));
25+
export const commandHistoryFuzzySearchIcon = registerIcon('terminal-command-history-fuzzy-search', Codicon.searchFuzzy, localize('terminalCommandHistoryFuzzySearch', 'Icon for toggling fuzzy search of command history.'));

0 commit comments

Comments
 (0)