mirror of
https://github.com/Eugeny/tabby.git
synced 2025-07-24 04:17:59 +00:00
fixed tmux argument list handling (closes #231)
This commit is contained in:
@@ -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("'", "\\'")}'` : '')
|
||||||
|
Reference in New Issue
Block a user