You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 3, 2025. It is now read-only.
Repository navigation
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
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
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
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
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.
Activity
jclc commentedon Jun 16, 2016
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.
[-]Don't touch .bashrc if the tmc executable is already in $PATH [/-][+]Don't touch .bashrc if the tmc executable is already in $PATH[/+]Salmela commentedon Jul 11, 2016
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.
Salmela commentedon Sep 4, 2016
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_FILEglobal variablenygrenh commentedon Sep 5, 2016
@Salmela Expecting package maintainers to set arbitrary environment variables seems unreasonable to me.
Salmela commentedon Sep 6, 2016
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.