Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

.tmc-autocomplete.sh should store opts on the disk instead of running tmc #389

Open

Description

@jclc

source $HOME/.tmc-autocomplete.sh makes starting a new shell take up several seconds. Running the JVM every time you start a shell is not a good idea at all.

Activity

  1. changed the title [-]sourcing .tmc-autocomplete.sh in rc file slows shell startup[/-] [+].tmc-autocomplete.sh should store opts on the disk instead of running tmc[/+] on Aug 16, 2016
  2. jclc commented on Aug 16, 2016

    @jclc
    ContributorAuthor

    Also, if tmc is not found, the script hangs and you won't be able to run the shell at all.

  3. Salmela commented on Aug 19, 2016

    @Salmela
    Contributor

    The problem most likely is that the tmc tries to auto update. It was fixed in commit 214f880 .

  4. Salmela commented on Aug 19, 2016

    @Salmela
    Contributor

    If the tmc doesn't exist. The bash script prints the following on my machine.
    bash: ~/tmc-cli/tmc: No such file or directory

    I think we should hide any error messages from the auto-completion code.
    The shell could die due to the strict mode set in your rc file. A workaround for this should be added into the launch script.

  5. jclc commented on Aug 19, 2016

    @jclc
    ContributorAuthor

    Yes, that seems to have been fixed in the master branch - I was using the latest release. Might be a good idea to draft a new one.

    That being said, even with the latest version tmc still adds a short but noticeable delay when starting a new shell. Probably no big deal for anyone with a sufficiently powerful machine, but I think it would still be best if .tmc-autocomplete didn't run any Java code. Users with toasters may end up having to wait a few seconds. I keep the source line in my .bashrc commented when I'm not actively using it to speed it up.

  6. Salmela commented on Aug 20, 2016

    @Salmela
    Contributor

    Yeah It's probably pretty easy to just dump the new commands into a file in the auto-update code. I will look into it.

  7. self-assigned this
    on Aug 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions