We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d1c083c commit fec47c7Copy full SHA for fec47c7
1 file changed
src/utils/prompt.ts
@@ -1,14 +1,15 @@
1
import * as vscode from 'vscode';
2
3
export function name(filename: string): Promise<string | undefined> {
4
+ const value = filename.replace(/(\.[^.]+)$/, '-copy.$1');
5
return vscode.window.showInputBox({
6
+ value,
7
placeHolder: 'Enter the new path for the duplicate.',
- value: filename.split('.').map((el, i) => i === 0 ? `${el}-copy` : el).join('.')
8
}) as Promise<string | undefined>;
9
}
10
11
export function overwrite(filepath: string): Promise<vscode.MessageItem | undefined> {
- 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?`;
13
const action = {
14
title: 'OK',
15
isCloseAffordance: false
0 commit comments