Skip to content

Set $VISUAL whenever $EDITOR is set#1661

Merged
rolandwalker merged 1 commit intomainfrom
RW/set-visual-with-editor
Feb 28, 2026
Merged

Set $VISUAL whenever $EDITOR is set#1661
rolandwalker merged 1 commit intomainfrom
RW/set-visual-with-editor

Conversation

@rolandwalker
Copy link
Contributor

Description

Set $VISUAL whenever $EDITOR is set, since prompt_toolkit consults $VISUAL first for the \edit command.

https://github.com/prompt-toolkit/python-prompt-toolkit/blob/c7c629c38b22b5f22a0a5e80a1ae7e758ac595bb/src/prompt_toolkit/buffer.py#L1626

Checklist

  • I added this contribution to the changelog.md file.
  • I added my name to the AUTHORS file (or it's already there).
  • To lint and format the code, I ran
    uv run ruff check && uv run ruff format && uv run mypy --install-types .

@rolandwalker rolandwalker self-assigned this Feb 28, 2026
@github-actions
Copy link

  1. Behavioral mismatch: feature not implemented in runtime code
    The PR title/body and changelog claim “Set $VISUAL whenever $EDITOR is set,” but the only functional change is in test setup (before_all) and does not affect actual mycli runtime behavior.
  • Changed line: test/features/environment.py:34
  • Claim line: changelog.md:6
    Action: either (a) implement this in application startup/runtime env handling, or (b) adjust title/body/changelog to clarify this is test-environment-only.

No security issues found in the diff.

Testing gap:

  • If runtime behavior is intended, add a test that verifies when only EDITOR is set, \edit still uses it even when VISUAL is unset/mis-set (unit/integration around editor invocation path).
  • I couldn’t run tests in this environment because pytest/uv are not installed.

since prompt_toolkit consults $VISUAL first for the \edit command.
@rolandwalker rolandwalker force-pushed the RW/set-visual-with-editor branch from 4c2bed5 to f078f0b Compare February 28, 2026 23:34
@rolandwalker rolandwalker merged commit a68cec0 into main Feb 28, 2026
8 checks passed
@rolandwalker rolandwalker deleted the RW/set-visual-with-editor branch February 28, 2026 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants