ttab icon indicating copy to clipboard operation
ttab copied to clipboard

No longer working in iTerm2

Open markclaxton opened this issue 4 years ago • 4 comments

I'm using iTerm2 version 3.4.12.

When I run my script the parameters of the script are changed during the process.

Screenshot 2021-11-19 at 12 26 59

Above is the image of the current output. The task is supposed to run a 'npm run serve' command. However, the directory is changed when the script is run. There's a semicolon after the user directory /users/USERNAME/folder/folder; npm run serve

markclaxton avatar Nov 19 '21 12:11 markclaxton

I'm running the same version, and I don't see this symptom.

That the command shows up multiple times and prints what look like ANSI escape sequences verbatim is definitely strange.

Is there something usual about your environment? Do you have software installed that hooks into your terminals, such as Fig?

mklement0 avatar Nov 19 '21 14:11 mklement0

I am indeed using Fig. Although I can run the same commands in the standard macOS Terminal app without issue, and with this is with Fig enabled.

markclaxton avatar Nov 21 '21 20:11 markclaxton

Ok, so I booted up my mac this morning, tried running the scripts again and ... it is working but with some differences in the output. Screenshot 2021-11-22 at 09 41 21

markclaxton avatar Nov 22 '21 09:11 markclaxton

I think that ttab is neither to blame here, nor do I think it can work around the issue.

It simply synthesizes an AppleScript behind the scenes and executes that.

You can make that script visible if you place the (undocumented) --print-script option first on the command line. To print the script only, without actually creating a new tab, use --dry-run.

I've just installed the latest Fig and it definitely lacks stability (I'm on an older macOS version, macOS 10.15.7).

Aside from outright crashes, I've only seen one strange symptom, which differs from yours: intermittently, the specified startup command for the new tab gets ignored.

I suggest you start with creating an issue in the Fig repo, at https://github.com/withfig/fig/issues. You can make it easier for them by boiling it down to an osascript -e call with the source code produced by --dry-run.

mklement0 avatar Nov 22 '21 15:11 mklement0