This commit is contained in:
Eugene Pankov 2020-04-20 15:35:15 +02:00
parent fc501b5e51
commit b8d9f6442a
2 changed files with 3 additions and 2 deletions

View File

@ -49,7 +49,7 @@ export class TerminalService {
}
getProfileID (profile: Profile): string {
return slugify(profile.name).toLowerCase()
return slugify(profile.name, { remove: /[:.]/g }).toLowerCase()
}
async getProfileByID (id: string): Promise<Profile> {

View File

@ -91,8 +91,9 @@ export class WSLShellProvider extends ShellProvider {
const wslVersion = childKey.Flags.value & 8 ? 2 : 1
const name = childKey.DistributionName.value
const fsBase = wslVersion === 2 ? `\\\\wsl$\\${name}` : childKey.BasePath.value as string + '\\rootfs'
const slug = slugify(name, { remove: /[:.]/g })
const shell: Shell = {
id: `wsl-${slugify(name)}`,
id: `wsl-${slug}`,
name: `WSL / ${name}`,
command: wslPath,
args: ['-d', name],