mirror of
https://github.com/Eugeny/tabby.git
synced 2024-12-25 11:33:35 +03:00
fixed tmux argument list handling (closes #231)
This commit is contained in:
parent
298637a150
commit
9d2398bc12
@ -153,8 +153,8 @@ export class TMux {
|
|||||||
|
|
||||||
async create (id: string, options: SessionOptions): Promise<void> {
|
async create (id: string, options: SessionOptions): Promise<void> {
|
||||||
await this.ready
|
await this.ready
|
||||||
let args = [options.command].concat(options.args)
|
let args = [options.command].concat(options.args.slice(1))
|
||||||
let cmd = args.map(x => `"${x.replace('"', '\\"')}"`)
|
let cmd = args.map(x => `"${x.replace('"', '\\"')}"`).join(' ')
|
||||||
await this.process.command(
|
await this.process.command(
|
||||||
`new-session -s "${id}" -d`
|
`new-session -s "${id}" -d`
|
||||||
+ (options.cwd ? ` -c '${options.cwd.replace("'", "\\'")}'` : '')
|
+ (options.cwd ? ` -c '${options.cwd.replace("'", "\\'")}'` : '')
|
||||||
|
Loading…
Reference in New Issue
Block a user