diff --git a/extensions/vscode-colorize-tests/.vscode/tasks.json b/extensions/vscode-colorize-tests/.vscode/tasks.json index d31b15910ee..05f664d5a00 100644 --- a/extensions/vscode-colorize-tests/.vscode/tasks.json +++ b/extensions/vscode-colorize-tests/.vscode/tasks.json @@ -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 diff --git a/src/vs/workbench/parts/lib/node/systemVariables.ts b/src/vs/workbench/parts/lib/node/systemVariables.ts index 56d126f3df7..799afb76711 100644 --- a/src/vs/workbench/parts/lib/node/systemVariables.ts +++ b/src/vs/workbench/parts/lib/node/systemVariables.ts @@ -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()); }