File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 11import * as vscode from 'vscode' ;
22
33export 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
1011export 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
You can’t perform that action at this time.
0 commit comments