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.

Don't touch .bashrc if the tmc executable is already in $PATH #254

Open

Description

@nygrenh

This occurs for example when tmc-cli is installed from npm.

One problem with this is that your autocomplete solution seems to depend on the .bashrc modification. This could be fixed by installing the appropriate autocompletion files globally (for example to /etc/bash_completion.d) when installing and placing the the executable directly to the $PATH

Activity

  1. jclc commented on Jun 16, 2016

    @jclc
    Contributor

    Note: also don't add if there is an alias called "tmc"

    Edit: Actually, this might be impossible to check since aliases aren't usually initialised in scripts.

  2. changed the title [-]Don't touch .bashrc if the tmc executable is already in $PATH [/-] [+]Don't touch .bashrc if the tmc executable is already in $PATH[/+] on Jun 16, 2016
  3. Salmela commented on Jul 11, 2016

    @Salmela
    Contributor

    We should export variable so that we can easily detect if the tmc-cli is already installed in scripts.

    The problem with aliases is that they aren't inherited by sub-shells.

  4. Salmela commented on Sep 4, 2016

    @Salmela
    Contributor

    The tmc launcher won't do anything if the tmc auto-completion file exists (~/.tmc-autocomplete.sh). It's location can be overridden with $TMC_AUTOCOMPLETE_FILE global variable

  5. nygrenh commented on Sep 5, 2016

    @nygrenh
    MemberAuthor

    @Salmela Expecting package maintainers to set arbitrary environment variables seems unreasonable to me.

  6. reopened this on Sep 5, 2016
  7. Salmela commented on Sep 6, 2016

    @Salmela
    Contributor

    Good call. I just assumed that package manager would put the autocompletion script into same place as the tmc launcher script, which wouldn't work very well because the default location was in the home directory.

    I now changed it so that if the tmc is in read-only directory then it won't try to create the tmc autocompletion script.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions