Add alternate_editor config option to specify an editor. #1350
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
Solution to issue #1342 . This change adds an
alternate_editor
config option. Previous functionality was to check the $VISUAL environment variable and use this and then if this is blank it would use $EDITOR. These environment variables are used by other software and as such a user may not want to change them, however they may want to not use a visual editor in pgcli or they may want to use a different editor to the default. By adding this alternate editor option a user can choose a different editor and even specify arguments if they want to use different editor behaviour while in pgcli.Checklist
changelog.rst
.AUTHORS
file (or it's already there).pip install pre-commit && pre-commit install
), and ranblack
on my code.