Skip to content

ShellStartup auto-activation adds newline #974

Description

Here I opened the left shell with python-envs.terminal.autoActivationType set to command, and the right shell with it set to shellStartup. This was my first time finding this feature so I don't know the age of the issue. I use fish shell.

Image

The cursor always appears on a newline.

Image

vscode 1.105.1
python 2025.16.0
python environments 1.11.13081013
fish shell 4.1.2

Activity

  1. anthonykim1 commented on Nov 13, 2025

    @anthonykim1
    Contributor

    When it runs through command does it still activate your environment?
    Normally people favor the one on the right since it's very obvious that venv is activated

  2. added
    info-neededIssue requires more information from poster
    bugIssue identified by VS Code Team member as probable bug
    and removed on Nov 13, 2025
  3. jgillard commented on Nov 13, 2025

    @jgillard
    Author

    Command actually wasn't working for me which is why I was changing this setting in the first place. I'm not sure why that was, as it did in the past, but that's a separate issue.

    You can see I have the name of the virtualenv in brackets in my shell so that's how I see if it's activated or not. It'd be news to me if people prefer a newline, it felt (and still feels) like a bug to me e.g. when I press CMD+K to clear my terminal, I see a blank terminal not the prompt in my screenshots.

  4. anthonykim1 commented on Nov 13, 2025

    @anthonykim1
    Contributor

    I meant the display of (venv) when I said people preferred the right.
    But I do see your point about the cursor being on next line.

    What kind of prompt are you using?

    Also curious to see what the behavior was when command didn't work. Did it just not send any activation command at all?

    • if this was consistent across your other shell as well.
  5. jgillard commented on Nov 17, 2025

    @jgillard
    Author

    Sorry I'm not sure what your prompt question is about :S I just meant the text that appears on the left side of each line by default.

    I tested with command again and it's actually just really slow:

    Screen.Recording.2025-11-17.at.13.25.16.mov
  6. github-actions commented on Dec 2, 2025

    @github-actions

    Hey Anthony Kim (@anthonykim1), this issue might need further attention.

    James Gillard (@jgillard), you can help us out by closing this issue if the problem no longer exists, or adding more information.

  7. anthonykim1 commented on Dec 3, 2025

    @anthonykim1
    Contributor

    You could switch the time with: terminal.integrated.shellIntegration.timeout
    Or even better try out the shell startup python-envs.terminal.autoActivationType by setting to shellStartup. This way you won't even see activation command, terminal will be activated the moment you open it up.

  8. jgillard commented on Dec 4, 2025

    @jgillard
    Author

    The value currently in terminal.integrated.shellIntegration.timeout is -1, what would you suggest?
    And then the python-envs.terminal.autoActivationType -> shellStartup loops back to my initial post: the newline bug.

  9. anthonykim1 commented on Feb 2, 2026

    @anthonykim1
    Contributor

    James Gillard (@jgillard) Sorry for delayed response here.
    0 would be minimum but you may see same command show up twice.. Otherwise try different number in ms to find the sweet spot:https://code.visualstudio.com/updates/v1_106#_consolidated-shell-integration-timeout-setting

  10. anthonykim1 commented on Feb 2, 2026

    @anthonykim1
    Contributor

    James Gillard (@jgillard) In terms of the prompt question, are you using things like oh-my-fish?

  11. anthonykim1 commented on Feb 2, 2026

    @anthonykim1
    Contributor
    Image
  12. jgillard commented on Feb 11, 2026

    @jgillard
    Author

    Hi again! I've set terminal.integrated.shellIntegration.timeout to 0 and that seems to be working nicely again. I don't use oh-my-fish, just stock fish shell afaik, but I may well have some unusual setup I've forgotten about. LMK if there's anything more I can do to debug for you.

  13. jgillard commented on Sep 24, 2026

    @jgillard
    Author

    Hi Eleanor Boyd (@eleanorjboyd). I can see your coment in my email but not here for some reason. Yes I retested now with latest vscode and fish shell, and with autoActivationType set to shellStartup, and the behaviour is the same i.e. there is a newline added every time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area-terminalEnvironment extension specific terminal issues.area-terminal-fishfish related terminal issue, specific to environment extensionbugIssue identified by VS Code Team member as probable buginfo-neededIssue requires more information from poster

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions