Skip to content

xonsh activator removes the user's own pydoc alias on deactivate #3586

Description

@Pratik-Kumar-Dhakar

Issue

The xonsh activator removes a pydoc alias the user had defined before activating, and doesn't put it back on deactivate:

aliases["pydoc"] = "echo my-own-pydoc"
source e1/bin/activate.xsh
deactivate
print(aliases.get("pydoc"))   # None

PATH, PKG_CONFIG_PATH and PYTHONHOME are all restored, including after switching between environments; only the alias is lost. register_pydoc overwrites aliases["pydoc"], and unregister_pydoc pops it. #3529 fixed the same thing for PowerShell's pydoc function.

Environment

  • OS: Zorin OS 17.3 (Ubuntu 22.04 base), Linux 6.8
  • Shell: bash 5.1
  • Python version and path: CPython 3.15.2 (uv-managed)
  • virtualenv: main @ 53748fe (21.15.9)
  • xonsh 0.25.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions