mirror of
https://github.com/Eugeny/tabby
synced 2025-01-07 02:39:12 +00:00
23 lines
562 B
TypeScript
23 lines
562 B
TypeScript
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(' ')
|
|
return [{
|
|
id: 'custom',
|
|
name: 'Custom',
|
|
command: args[0],
|
|
args: args.slice(1),
|
|
}]
|
|
}
|
|
}
|