Skip to content

Commit 0049050

Browse files
committed
Change the suffix position
Fix spelling mistake
1 parent d1c083c commit 0049050

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/utils/prompt.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
import * as vscode from 'vscode';
22

33
export function name(filename: string): Promise<string | undefined> {
4+
const value = filename.replace(/.\w+$/, '-copy.$1');
45
return vscode.window.showInputBox({
6+
value,
57
placeHolder: 'Enter the new path for the duplicate.',
6-
value: filename.split('.').map((el, i) => i === 0 ? `${el}-copy` : el).join('.')
78
}) as Promise<string | undefined>;
89
}
910

1011
export function overwrite(filepath: string): Promise<vscode.MessageItem | undefined> {
11-
const message = `The path **${filepath}** alredy exists. Do you want to overwrite the existing path?`;
12+
const message = `The path **${filepath}** already exists. Do you want to overwrite the existing path?`;
1213
const action = {
1314
title: 'OK',
1415
isCloseAffordance: false

0 commit comments

Comments
 (0)