Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add @ as alternative to __xonsh__ #2

Open
anki-code opened this issue Jul 9, 2024 · 2 comments
Open

Add @ as alternative to __xonsh__ #2

anki-code opened this issue Jul 9, 2024 · 2 comments

Comments

@anki-code
Copy link
Member

anki-code commented Jul 9, 2024

It will be cool to have this:

@
# <xonsh.built_ins.XonshSession at 0x1064fd9a0>

@?
# XonshSession doc string with description @.env, @.imp, @.last, @.history, etc.

@.env                                    # instead of `__xonsh__.env` and forget about `${...}`
@.history                                # instead of `__xonsh__.history`
@.imp.json.loads('{}')                   # https://github.com/xonsh/xonsh/pull/5595

with @.env.swap(SOMEVAR='foo'):
     echo $SOMEVAR
@anki-code
Copy link
Member Author

anki-code commented Jul 11, 2024

@jnoortheen is it possible to implement this in the current version of parser as well with minimal changes?
It will be super awesome and support xonsh/xonsh#5595

@anki-code
Copy link
Member Author

@jnoortheen here is the motivation - xonsh/xonsh#5411 (comment)

@anki-code anki-code changed the title Add @. as alternative to __xonsh__. Add @ as alternative to __xonsh__ Jul 12, 2024
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

No branches or pull requests

1 participant