Skip to content

fix(complete): Update Elvish registration to modern syntax#6259

Open
AndreasBackx wants to merge 1 commit intoclap-rs:masterfrom
AndreasBackx:fix/elvish-deprecated-syntax
Open

fix(complete): Update Elvish registration to modern syntax#6259
AndreasBackx wants to merge 1 commit intoclap-rs:masterfrom
AndreasBackx:fix/elvish-deprecated-syntax

Conversation

@AndreasBackx
Copy link
Copy Markdown
Contributor

@AndreasBackx AndreasBackx commented Feb 13, 2026

This PR was generated with the assistance of an AI agent and reviewed by me.

Resolves #5729

Summary

Updates the Elvish dynamic completion registration script to use tmp E:VAR = value instead of the deprecated env VAR=value command pattern. The old syntax was deprecated in Elvish 0.18 and removed entirely in 0.21.

Changes

clap_complete/src/env/shells.rs: The Elvish write_registration template now uses tmp E: for temporary environment variables. The tmp command automatically restores previous values when the enclosing lambda returns.

No dedicated unit test was added because the existing integration tests in elvish.rs lready
validate the Elvish completion flow end-to-end through completest_pty::ElvishRuntimeBuilder`.

Test plan

  • cargo test -p clap_complete --features unstable-dynamic — all 107 tests pass
  • cargo clippy -p clap_complete --features unstable-dynamic — clean

@AndreasBackx AndreasBackx changed the title fix(complete): update Elvish registration to modern syntax fix(complete): Update Elvish registration to modern syntax Feb 13, 2026
@AndreasBackx AndreasBackx marked this pull request as ready for review February 13, 2026 01:15
Replace the deprecated `env VAR=value command` pattern with the `tmp
E:VAR = value` syntax for setting temporary environment variables in
Elvish completion registration scripts. The `env` command was removed
in Elvish 0.21, while `tmp` has been available since Elvish 0.18.
@AndreasBackx AndreasBackx force-pushed the fix/elvish-deprecated-syntax branch from de682af to 5791dcd Compare February 13, 2026 01:41
@epage
Copy link
Copy Markdown
Member

epage commented Feb 13, 2026

This does not address the points discussed in #5729

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.

clap_complete::env::Elvish generates code deprecated in 0.18, removed in 0.21

2 participants