feat: Proxy that can register and unload by request
Author: anki-codeCreated Dec 17, 2025Updated May 22, 2026
Labelsxontribdevelopment
It will be cool to have a proxy for aliases, events, env variables that can register and unload by request e.g.
__xonsh__.proxy['some_plugin'].register_alias({'ll':'ls -la'})
__xonsh__.proxy['some_plugin'].register_env({'PLUGIN_VAR': True})
@event.on_preprompt
def _pp():
pass
__xonsh__.proxy['some_plugin'].register_event(pp)
aliases['ll']
# ls -la
$PLUGIN_VAR
# True
__xonsh__.proxy['some_plugin'].unload()
aliases['ll']
# KeyError
$PLUGIN_VAR
# KeyErrorFor community
⬇️ Please click the reaction instead of leaving a +1 or comment
Source: xonsh/xonsh