-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't touch .bashrc if the tmc executable is already in $PATH #254
Comments
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. |
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. |
The tmc launcher won't do anything if the tmc auto-completion file exists ( |
@Salmela Expecting package maintainers to set arbitrary environment variables seems unreasonable to me. |
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. |
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 $PATHThe text was updated successfully, but these errors were encountered: