Compare commits

...

5 Commits

Author SHA1 Message Date
Eugene Pankov
980834df6f macOS UTF8 fixes fixed #31, fixed #40 2017-07-08 11:30:25 +02:00
Eugene Pankov
50968508df fixed cwd detection on el capitan (fixes #63) 2017-07-06 10:37:52 +02:00
Eugene Pankov
8ee93297be properly display Space in hotkeys (fixes #76) 2017-07-06 10:28:33 +02:00
Eugene Pankov
dc9b2553ae Merge branch 'master' of github.com:Eugeny/terminus 2017-07-06 10:28:31 +02:00
Eugene Pankov
9834b27b8d bump 2017-07-05 16:24:03 +02:00
9 changed files with 29 additions and 8 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "terminus-community-color-schemes",
"version": "1.0.0-alpha.14.3",
"version": "1.0.0-alpha.16-8-gfc060ac",
"description": "Community color schemes for Terminus",
"keywords": [
"terminus-plugin"

View File

@@ -1,6 +1,6 @@
{
"name": "terminus-core",
"version": "1.0.0-alpha.14",
"version": "1.0.0-alpha.16-8-gfc060ac",
"description": "Terminus core",
"keywords": [
"terminus-plugin"

View File

@@ -45,7 +45,9 @@ export function stringifyKeySequence (events: NativeKeyEvent[]): string[] {
// TODO make this optional?
continue
}
if (event.key.length === 1) {
if (event.key === ' ') {
itemKeys.push('Space')
} else if (event.key.length === 1) {
itemKeys.push(event.key.toUpperCase())
} else {
itemKeys.push(event.key)

View File

@@ -1,6 +1,6 @@
{
"name": "terminus-plugin-manager",
"version": "1.0.0-alpha.14",
"version": "1.0.0-alpha.16-8-gfc060ac",
"description": "Terminus' plugin manager",
"keywords": [
"terminus-plugin"

View File

@@ -1,6 +1,6 @@
{
"name": "terminus-settings",
"version": "1.0.0-alpha.14",
"version": "1.0.0-alpha.16-8-gfc060ac",
"description": "Terminus terminal settings page",
"keywords": [
"terminus-plugin"

View File

@@ -73,6 +73,7 @@ export class HotkeyInputModalComponent {
}
ngOnDestroy () {
this.hotkeys.clearCurrentKeystrokes()
this.hotkeys.enable()
clearInterval(this.keyTimeoutInterval)
}

View File

@@ -1,6 +1,6 @@
{
"name": "terminus-terminal",
"version": "1.0.0-alpha.14",
"version": "1.0.0-alpha.16-8-gfc060ac",
"description": "Terminus' terminal emulation core",
"keywords": [
"terminus-plugin"

View File

@@ -88,7 +88,7 @@ export class ScreenPersistenceProvider extends SessionPersistenceProvider {
await fs.writeFile(configPath, `
escape ^^^
vbell on
deflogin off
deflogin on
term xterm-color
bindkey "^[OH" beginning-of-line
bindkey "^[OF" end-of-line
@@ -98,6 +98,8 @@ export class ScreenPersistenceProvider extends SessionPersistenceProvider {
defhstatus "^Et"
hardstatus off
altscreen on
defutf8 on
defencoding utf8
`, 'utf-8')
let recoveryId = `term-tab-${Date.now()}`
let args = ['-d', '-m', '-c', configPath, '-U', '-S', recoveryId, '-T', 'xterm-256color', '--', '-' + options.command].concat(options.args || [])

View File

@@ -28,6 +28,18 @@ export class Session {
...options.env,
TERM: 'xterm-256color',
}
if (process.platform === 'darwin' && !process.env.LC_ALL) {
let locale = process.env.LC_CTYPE || 'en_US.UTF-8'
Object.assign(env, {
LANG: locale,
LC_ALL: locale,
LC_MESSAGES: locale,
LC_NUMERIC: locale,
LC_COLLATE: locale,
LC_MONETARY: locale,
})
}
this.pty = nodePTY.spawn(options.command, options.args || [], {
name: 'xterm-256color',
cols: options.width || 80,
@@ -118,7 +130,11 @@ export class Session {
async getWorkingDirectory (): Promise<string> {
if (process.platform === 'darwin') {
let lines = (await exec(`lsof -p ${this.truePID} -Fn`))[0].toString().split('\n')
return lines[2].substring(1)
if (lines[1] === 'fcwd') {
return lines[2].substring(1)
} else {
return lines[1].substring(1)
}
}
if (process.platform === 'linux') {
return await fs.readlink(`/proc/${this.truePID}/cwd`)