1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-12-25 03:22:58 +03:00

fixed tmux argument list handling (closes #231)

This commit is contained in:
Eugene Pankov 2017-12-07 20:21:02 +01:00
parent 298637a150
commit 9d2398bc12

View File

@ -153,8 +153,8 @@ export class TMux {
async create (id: string, options: SessionOptions): Promise<void> {
await this.ready
let args = [options.command].concat(options.args)
let cmd = args.map(x => `"${x.replace('"', '\\"')}"`)
let args = [options.command].concat(options.args.slice(1))
let cmd = args.map(x => `"${x.replace('"', '\\"')}"`).join(' ')
await this.process.command(
`new-session -s "${id}" -d`
+ (options.cwd ? ` -c '${options.cwd.replace("'", "\\'")}'` : '')