This commit is contained in:
Eugene Pankov
2019-02-17 12:32:37 +01:00
parent 3ee1f1b023
commit 6b56155ca5
4 changed files with 24 additions and 2 deletions

View File

@@ -1,4 +1,5 @@
import * as fs from 'mz/fs'
import slug from 'slug'
import { Injectable } from '@angular/core'
import { HostAppService, Platform } from 'terminus-core'
@@ -21,7 +22,7 @@ export class POSIXShellsProvider extends ShellProvider {
.map(x => x.trim())
.filter(x => x && !x.startsWith('#'))
.map(x => ({
id: x,
id: slug(x),
name: x,
command: x,
args: ['-l'],

View File

@@ -1,4 +1,6 @@
import * as fs from 'mz/fs'
import slug from 'slug'
import { Registry } from 'rage-edit'
import { Injectable } from '@angular/core'
import { HostAppService, Platform } from 'terminus-core'
@@ -53,7 +55,7 @@ export class WSLShellProvider extends ShellProvider {
}
let name = (child as any).$values.distributionname
shells.push({
id: `wsl-${name}`,
id: `wsl-${slug(name)}`,
name: `WSL / ${name}`,
command: wslPath,
args: ['-d', name],