tabby/terminus-terminal/src/shells/custom.ts

24 lines
562 B
TypeScript
Raw Normal View History

2017-10-07 15:27:58 +00:00
import { Injectable } from '@angular/core'
import { ConfigService } from 'terminus-core'
import { ShellProvider, IShell } from '../api'
@Injectable()
export class CustomShellProvider extends ShellProvider {
constructor (
private config: ConfigService,
) {
super()
}
async provide (): Promise<IShell[]> {
let args = this.config.store.terminal.customShell.split(' ')
2017-10-07 15:27:58 +00:00
return [{
id: 'custom',
name: 'Custom',
command: args[0],
args: args.slice(1),
2017-10-07 15:27:58 +00:00
}]
}
}