Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ${/} as a shorter alias for ${pathSeparator} predefined variable #200750

Merged
merged 1 commit into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function registerVariableCompletions(pattern: string): vscode.Disposable {
{ label: 'fileBasename', detail: vscode.l10n.t("The current opened file's basename") },
{ label: 'fileBasenameNoExtension', detail: vscode.l10n.t("The current opened file's basename with no file extension") },
{ label: 'defaultBuildTask', detail: vscode.l10n.t("The name of the default build task. If there is not a single default build task then a quick pick is shown to choose the build task.") },
{ label: 'pathSeparator', detail: vscode.l10n.t("The character used by the operating system to separate components in file paths") },
{ label: 'pathSeparator', detail: vscode.l10n.t("The character used by the operating system to separate components in file paths. Is also aliased to '/'.") },
{ label: 'extensionInstallFolder', detail: vscode.l10n.t("The path where an an extension is installed."), param: 'publisher.extension' },
].map(variable => ({
label: `\${${variable.label}}`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ export enum VariableKind {
FileDirnameBasename = 'fileDirnameBasename',
ExecPath = 'execPath',
ExecInstallFolder = 'execInstallFolder',
PathSeparator = 'pathSeparator'
PathSeparator = 'pathSeparator',
PathSeparatorAlias = '/'
}

export class VariableError extends Error {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ export class AbstractVariableResolverService implements IConfigurationResolverSe
return match;
}
case 'pathSeparator':
case '/':
return paths.sep;

default:
Expand Down