Skip to content
Discussion options

You must be logged in to vote
@aliases.register
def _wine32(args):
    overrides = {
        'WINEPREFIX': f"$HOME/.wine32",
        'WINEARCH': 'win32',
    }
    with @.env.swap(**overrides):
        wine @(args)

Inside the with block the variables take effect; afterwards they snap back. No manual export / unset dance.

Replies: 1 comment

Comment options

anki-code
May 30, 2026
Maintainer Author

You must be logged in to vote
0 replies
Answer selected by anki-code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant