Directory Stack (xonsh.dirstack)

Directory stack and associated utilities for the xonsh shell., stdin=None)[source]

Changes the directory.

If no directory is specified (i.e. if args is None) then this changes to the current user’s home directory.

xonsh.dirstack.dirs(args, stdin=None)[source]

xonsh command: dirs

Displays the list of currently remembered directories. Can also be used to clear the directory stack.

xonsh.dirstack.popd(args, stdin=None)[source]

xonsh command: popd

Removes entries from the directory stack.

xonsh.dirstack.pushd(args, stdin=None)[source]

xonsh command: pushd

Adds a directory to the top of the directory stack, or rotates the stack, making the new top of the stack the current working directory.

On Windows, if the path is a UNC path (begins with \<server><share>) and if the DisableUNCCheck registry value is not enabled, creates a temporary mapped drive letter and sets the working directory there, emulating behavior of PUSHD in CMD.EXE

xonsh.dirstack.DIRSTACK: List[str] = []

A list containing the currently remembered directories.