mirror of
https://github.com/Eugeny/tabby.git
synced 2024-12-25 11:33:35 +03:00
Cmder support (fixes #347)
This commit is contained in:
parent
1d69082e6c
commit
5d605a4853
@ -26,7 +26,7 @@
|
||||
* Doesn't choke on fast-flowing outputs
|
||||
* Tab persistence on macOS and Linux
|
||||
* Proper shell-like experience on Windows including tab completion (thanks, Clink!)
|
||||
* CMD, PowerShell, Cygwin, Git-Bash and Bash on Windows support
|
||||
* CMD, PowerShell, PowerShell Core, Cygwin, Cmder, Git-Bash and WSL (Bash on Windows) support
|
||||
* Default Linux style hotkeys for copy (`Ctrl`+`Shift`+`C`) and paste (`Ctrl`+`Shift`+`V`)
|
||||
|
||||
---
|
||||
|
@ -26,6 +26,7 @@ import { TerminalConfigProvider } from './config'
|
||||
import { TerminalHotkeyProvider } from './hotkeys'
|
||||
import { HyperColorSchemes } from './colorSchemes'
|
||||
|
||||
import { CmderShellProvider } from './shells/cmder'
|
||||
import { CustomShellProvider } from './shells/custom'
|
||||
import { Cygwin32ShellProvider } from './shells/cygwin32'
|
||||
import { Cygwin64ShellProvider } from './shells/cygwin64'
|
||||
@ -61,6 +62,7 @@ import { hterm } from './hterm'
|
||||
{ provide: SessionPersistenceProvider, useClass: ScreenPersistenceProvider, multi: true },
|
||||
{ provide: SessionPersistenceProvider, useClass: TMuxPersistenceProvider, multi: true },
|
||||
|
||||
{ provide: ShellProvider, useClass: CmderShellProvider, multi: true },
|
||||
{ provide: ShellProvider, useClass: WindowsStockShellsProvider, multi: true },
|
||||
{ provide: ShellProvider, useClass: MacOSDefaultShellProvider, multi: true },
|
||||
{ provide: ShellProvider, useClass: LinuxDefaultShellProvider, multi: true },
|
||||
|
38
terminus-terminal/src/shells/cmder.ts
Normal file
38
terminus-terminal/src/shells/cmder.ts
Normal file
@ -0,0 +1,38 @@
|
||||
import * as path from 'path'
|
||||
import { Injectable } from '@angular/core'
|
||||
import { HostAppService, Platform } from 'terminus-core'
|
||||
|
||||
import { ShellProvider, IShell } from '../api'
|
||||
|
||||
|
||||
@Injectable()
|
||||
export class CmderShellProvider extends ShellProvider {
|
||||
constructor (
|
||||
private hostApp: HostAppService,
|
||||
) {
|
||||
super()
|
||||
}
|
||||
|
||||
async provide (): Promise<IShell[]> {
|
||||
if (this.hostApp.platform !== Platform.Windows) {
|
||||
return []
|
||||
}
|
||||
|
||||
if (!process.env.CMDER_ROOT) {
|
||||
return []
|
||||
}
|
||||
|
||||
return [{
|
||||
id: 'cmder',
|
||||
name: 'Cmder',
|
||||
command: 'cmd.exe',
|
||||
args: [
|
||||
'/k',
|
||||
path.join(process.env.CMDER_ROOT, 'vendor', 'init.bat'),
|
||||
]
|
||||
env: {
|
||||
TERM: 'cygwin',
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user