konradsz / igrep

Interactive Grep
MIT License
657 stars 17 forks source link

prefer $VISUAL over $EDITOR #37

Closed TeFiLeDo closed 1 year ago

TeFiLeDo commented 1 year ago

This prefers the $VISUAL environment variable over $EDITOR, which mirrors the behaviour of other applications.

This is not yet reflected in the test, specifically crate::ui::editor::tests::editor_options_precedence, because I don't know how the #[test_case(…)] macro works.

TeFiLeDo commented 1 year ago

I now added a test. Please have a look if that is how it works.

I added the additional argument between the existing ones to keep them in order of precedence.

konradsz commented 1 year ago

Yes, this is the idea behind those tests. Let's merge it, thanks again!