mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-30 02:34:52 +01:00
adding relFile to support substituting the path tot he current open file realtive to cwd
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
// Available variables which can be used inside of strings.
|
||||
// ${workspaceRoot}: the root folder of the team
|
||||
// ${file}: the current opened file
|
||||
// ${relFile}: the current opened file relative to cwd
|
||||
// ${fileBasename}: the current opened file's basename
|
||||
// ${fileDirname}: the current opened file's dirname
|
||||
// ${fileExtname}: the current opened file's extension
|
||||
|
||||
@@ -48,6 +48,10 @@ export class SystemVariables extends AbstractSystemVariables {
|
||||
return this.getFilePath();
|
||||
}
|
||||
|
||||
public get relFile(): string {
|
||||
return Paths.relative(this.cwd, this.file);
|
||||
}
|
||||
|
||||
public get fileBasename(): string {
|
||||
return Paths.basename(this.getFilePath());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user