Closed fwesss closed 2 years ago
Having a hard time reproducing this in the most recent version
I can reproduce this with withfig/autocomplete, haven't tried elsewhere.
(autocomplete not showing because 1Password triggering secure input)
Same thing happens using a raycast shell script.
@tyriar - perhaps you could help here.
How exactly does VSCode tasks send code to the terminal? Is it pasted in at the OS/xterm level or done through the shell?
What's happening is your shell session loads, then immediately after, Fig's pseuodterminal, figterm, is loading. The time difference there is tiny and effectively not noticeable if the user is typing. But it seems like automated processes like VSCode tasks have their text eaten up somehow.
How can we help users get around this? Ideas:
Any thoughts for us?
Thanks for you time!
You can see exactly how the shell gets launched by setting log level to trace via the command palette and checking the devtools console. Here's an example of a task running on macOS:
So it's essentially bash -c <command>
here. Is the problem that you're sourcing fig in non-interactive terminals? Fig shouldn't be running at all for tasks imo. Note also that the VS Code "shell environment" that belongs to the window is sourced by running env
in an $SHELL -ilc
, terminal processed inherit this environment by default so variables that fig exports could show up in the environment that the task shell is launched with.
I don't know what you could be doing to cause what's happening in the recordings other than launching a sub shell which you definitely shouldn't be doing in a task as it would break everything.
@sullivan-sean @SeparateRecords
Note: when bash and zsh include a -c
flag, they set a shell variable that corresponds to it: BASH_EXECUTION_STRING
and ZSH_EXECUTION_STRING
respectively.
We can read this value and use it to set FIG_INITIAL_TEXT
.
Or we can just launch the figterm
's child shell with the same arguments.
This issue also occurs with https://github.com/mklement0/ttab
@SeparateRecords I can't seem to reproduce this.
I can reproduce this with withfig/autocomplete, haven't tried elsewhere.
CleanShot.2022-02-16.at.15.22.44.mp4 (autocomplete not showing because 1Password triggering secure input)
@mschrage Weird, this is super reliably reproducible for me - maybe a fish thing? Although a lot of people seem to have this bug with zsh too. You're welcome to remote into my machine to debug stuff.
Narrator: it was a fish thing.
This should be resolved in the next release. In bash/zsh, Fig detects if a shell has been launched with -c
. In fish, Fig is not attached to non-interactive shells.
Sanity checks
Issue Details
Description:
I have tasks setup in VSCode to run on keyboard shortcuts. When Fig is installed, triggering the task drops me into a terminal prompt but the task does not run.
Environment