feat(installer): option to set path to include install prefix #4263
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Updated the installer script to be able to detect the user's current login shell and add the install prefix (.local/bin by default) to the path of its corresponding dotfile. it prompts the user to do this if the script was launched in interactive mode and the script does not detect that the install prefix is in the current path. If the script is not in interactive mode, the script performs its current behavior of echoing a warning at the end of installation.
Currently, it will only autodetect zsh and fish and change their paths, while defaulting to changing ~/.profile if the login shell is something else. This can easily be expanded with further commits.
fixes #4135
How Has This Been Tested?
I have set up clean virtual machines and attempted installation with the user shell set as zsh, bash, and fish. In each instance, it appended to the file correctly, and after re-sourcing the dotifles, lvim was able to be executed. Additionally, attempting installation with the install prefix already on the path correctly skipped this step.