Skip to content

Commit 6bfb59d

Browse files
authored
improve consistency of function names (microsoft#251145)
1 parent b1cd91b commit 6bfb59d

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/vs/workbench/contrib/terminalContrib/suggest/browser/terminalCompletionService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { TerminalCompletionItemKind, type ITerminalCompletion } from './terminal
1717
import { env as processEnv } from '../../../../../base/common/process.js';
1818
import type { IProcessEnvironment } from '../../../../../base/common/platform.js';
1919
import { timeout } from '../../../../../base/common/async.js';
20-
import { gitBashPathToWindows } from './terminalGitBashHelpers.js';
20+
import { gitBashToWindowsPath } from './terminalGitBashHelpers.js';
2121

2222
export const ITerminalCompletionService = createDecorator<ITerminalCompletionService>('terminalCompletionService');
2323

@@ -282,7 +282,7 @@ export class TerminalCompletionService extends Disposable implements ITerminalCo
282282
}
283283
case 'absolute': {
284284
if (shellType === WindowsShellType.GitBash) {
285-
lastWordFolderResource = URI.file(gitBashPathToWindows(lastWordFolder, this._processEnv.SystemDrive));
285+
lastWordFolderResource = URI.file(gitBashToWindowsPath(lastWordFolder, this._processEnv.SystemDrive));
286286
} else {
287287
lastWordFolderResource = URI.file(lastWordFolder.replaceAll('\\ ', ' '));
288288
}

src/vs/workbench/contrib/terminalContrib/suggest/browser/terminalGitBashHelpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* "/c/Users/foo" => "C:\\Users\\foo"
1212
* "/d/bar" => "D:\\bar"
1313
*/
14-
export function gitBashPathToWindows(path: string, driveLetter?: string): string {
14+
export function gitBashToWindowsPath(path: string, driveLetter?: string): string {
1515
// Dynamically determine the system drive (default to 'C:' if not set)
1616
const systemDrive = (driveLetter || 'C:').toUpperCase();
1717
// Handle root "/"

src/vs/workbench/contrib/terminalContrib/suggest/test/browser/terminalCompletionService.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { TerminalCapability } from '../../../../../../platform/terminal/common/c
1919
import { ITerminalCompletion, TerminalCompletionItemKind } from '../../browser/terminalCompletionItem.js';
2020
import { count } from '../../../../../../base/common/strings.js';
2121
import { WindowsShellType } from '../../../../../../platform/terminal/common/terminal.js';
22-
import { gitBashPathToWindows, windowsToGitBashPath } from '../../browser/terminalGitBashHelpers.js';
22+
import { gitBashToWindowsPath, windowsToGitBashPath } from '../../browser/terminalGitBashHelpers.js';
2323

2424
const pathSeparator = isWindows ? '\\' : '/';
2525

@@ -615,10 +615,10 @@ suite('TerminalCompletionService', () => {
615615
if (isWindows) {
616616
suite('gitbash', () => {
617617
test('should convert Git Bash absolute path to Windows absolute path', () => {
618-
assert.strictEqual(gitBashPathToWindows('/'), 'C:\\');
619-
assert.strictEqual(gitBashPathToWindows('/c/'), 'C:\\');
620-
assert.strictEqual(gitBashPathToWindows('/c/Users/foo'), 'C:\\Users\\foo');
621-
assert.strictEqual(gitBashPathToWindows('/d/bar'), 'D:\\bar');
618+
assert.strictEqual(gitBashToWindowsPath('/'), 'C:\\');
619+
assert.strictEqual(gitBashToWindowsPath('/c/'), 'C:\\');
620+
assert.strictEqual(gitBashToWindowsPath('/c/Users/foo'), 'C:\\Users\\foo');
621+
assert.strictEqual(gitBashToWindowsPath('/d/bar'), 'D:\\bar');
622622
});
623623

624624
test('should convert Windows absolute path to Git Bash absolute path', () => {

0 commit comments

Comments
 (0)