Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 19:08
    deeuu commented #3967
  • 18:55
    jnoortheen commented #3967
  • 18:39
    deeuu commented #3967
  • 18:12
    anki-code commented #2159
  • 17:48
    anki-code commented #2159
  • 17:26
    abo123456789 starred xonsh/xonsh
  • 17:20
    anki-code commented #4096
  • 17:18
    anki-code commented #4096
  • 17:18
    anki-code commented #4096
  • 17:16
    anki-code commented #4096
  • 17:13
    anki-code commented #4096
  • 17:13
    anki-code commented #4096
  • 16:41
    anki-code edited #4143
  • 16:34
    yu-ichiro starred xonsh/xonsh
  • 16:33
    anki-code review_requested #4143
  • 16:32
    anki-code commented #3279
  • 16:30
    anki-code commented #3279
  • 16:30
    anki-code commented #3279
  • 16:27
    anki-code commented #3279
  • 16:19
    anki-code labeled #3279
Jamie Bliss
@AstraLuma
today in $DAYJOB, someone found the pycon 2016 talk, and we got to talking about how to use xonsh on old-ubuntu (py3.5) blades without shared logins/homedirs
andrii482
@andrii482
what mean that "xonsh also has an IRC room (#xonsh on OFTC). The conversations in these two rooms are kept in sync by a bot named @lou-carcolh. " ? Becouse I asked some question in IRC, but dont see it here ?
1 reply
and one more question : is 'powerline2' added to 'xontribs' ? xonsh/xonsh#3947
30 replies
Ricardo Hernandez
@richerve
Hi. Just tried to install xonsh 0.9.25 using both pipx and AppImage (this is in Linux btw). In both cases the reported version is wrong. In the AppImage it says 0.9.24.dev223 and in pipx it installs 0.9.24 for some reason.
using plain pip seems to work, but yet again the version doesn't look right: 0.9.25.dev3
also the official docs still point to 0.9.24 as latest version in changelog and in the readthedocs title
are these known issues?
6 replies
Ricardo Hernandez
@richerve
in the AppImage version it says that last commit is: Commit Date | Jan 25 16:37:29 2021
Mark Bestley
@bestlem
I upgraded from 0.9.24 to 0.9.25 I now get this message on start
The xonsh.proc module has been deprecated in favor of the xonsh.procs subpackage. But I do not call that in my rc.xsh. Does this come from an xontrib and if so how do those upgrade?
1 reply
Mark Bestley
@bestlem
I am trying to use xonsh as a shell during compilation and am somewhat confused by is it an interactive shell and what startup files it uses.
As far as I can see $XONSH_INTERACTIVE is correctly set
But if $XONSH_INTERACTIVE is False then no startup files are read whcih seems wrong - how do I set environment variables etc (as I my default shell is zsh - those variables were inherited) But this implies there is no point using xonsh here as I can't configure it
Mark Bestley
@bestlem

@jwlynch_gitlab I think a non-login xonsh shell (e.g. from a subprocess line like xonsh my_awsome_script.xsh) will not read the .xonshrc, whereas xonsh -l my_awsome_script.xsh will do so. However I haven't tested this explicitly.

Seems to be the same issue I see and my guess from the code is .xonshrc will not be read in either case - as a file is provided so XONS_INTERACTIVE is set to False and so rc not read

5 replies
Luc Ritchie
@wlritchi

I'm trying to speed up my .xonshrc and I've discovered that adding aliases is substantially slower than I expected - nearly 4000 times slower than just adding items to a dict:

from timeit import timeit

def thousand_aliases():
    for i in range(1000):
        str = f'echo{i}'
        aliases[str] = 'echo'

def thousand_dict_entries():
    d = {}
    for i in range(1000):
        str = f'echo{i}'
        d[str] = 'echo'

timeit(thousand_aliases, number=1)
# 3.0883793910034
timeit(thousand_dict_entries, number=4000)
# 3.19940147199668

On my machine this is actually slow enough that my real list of aliases takes several seconds to apply. Is this known/expected behaviour?

6 replies
Tejasvi S Tomar
@tejasvi
Any way to turn off conda package suggestion for command not found (internally xonsh.tools.conda_suggest_command_not_found(cmd, env))? There doesn't seem to be any env variable for that.
Tejasvi S Tomar
@tejasvi
AE
@humdrumcomet
Hey I'm getting an issue when using git in xonsh where sometimes I get fatal:unable to access '~/.gitconfig': interrupted system call. The only thing ive been able to find that sort of matches this is this issue xonsh/xonsh#2358 but this was closed a couple days. should I add to that issue?
1 reply
Sorry I should have added, this is on fedora 33 using kitty as the terminal emulator
anki-code
@anki-code

:octocat: Hi folks! I want to remember you some points that help xonsh community:

  1. if you have xonsh related projects on Github please add the xonsh or xontrib topics to the repository "About" settings. This allows to search your solutions using Github Topics: xonsh or xontrib.

  2. if you have useful scripts written on xonsh in Github Gists the better way is to create repository with README for them that allows create issues and fork the code.

  3. if you have the code on BitBucket or similar the better way to create empty repository on Github with README that contains the link on original repository and tag it like in point 1.

  4. Finally take a look at promotion guide that written for xontribs but actual for any xonsh repository.

:octocat: Xanks!

anki-code
@anki-code
:card_index: Past week we made a bit cleaning in the issues: we reviewed around 150 unlabelled issues and added the labels to them or close the stalled issues. If you want to help xonsh but don't know the start point click the "good first issue" label.
MagnetonBora
@MagnetonBora
Hey guys, haven’t find the answer for my question, so writing here. Is it possible to distinguish “set” in xonsh? In a sense that there is a pythonic data structure called “set” and bash command which deals with virtual variables.
5 replies
CaféHaine
@cafehaine

Hi everyone,
I'm having some weird internal parser issues when trying to load my xontrib xlsd, I'm not really sure where to look at to help me debug this.

cafehaine@galifeu ~ master $ $XONSH_SHOW_TRACEBACK=True
cafehaine@galifeu ~ master $ xontrib load xlsd
xonsh: To log full traceback to a file set: $XONSH_TRACEBACK_LOGFILE = <filename>
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/xonsh/__amalgam__.py", line 10835, in xontribs_load
    update_context(name, ctx=ctx)
  File "/usr/lib/python3.9/site-packages/xonsh/__amalgam__.py", line 10780, in update_context
    modctx = xontrib_context(name)
  File "/usr/lib/python3.9/site-packages/xonsh/__amalgam__.py", line 10746, in xontrib_context
    m = importlib.import_module(spec.name)
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 786, in exec_module
  File "/usr/lib/python3.9/site-packages/xonsh/__amalgam__.py", line 24307, in get_code
    code = execer.compile(src, glbs=ctx, locs=ctx)
  File "/usr/lib/python3.9/site-packages/xonsh/__amalgam__.py", line 23992, in compile
    tree = self.parse(input, ctx, mode=mode, filename=filename, transform=transform)
  File "/usr/lib/python3.9/site-packages/xonsh/__amalgam__.py", line 23952, in parse
    tree, input = self._parse_ctx_free(input, mode=mode, filename=filename)
  File "/usr/lib/python3.9/site-packages/xonsh/__amalgam__.py", line 24076, in _parse_ctx_free
    tree = self.parser.parse(
  File "/usr/lib/python3.9/site-packages/xonsh/parsers/base.py", line 497, in parse
    tree = self.parser.parse(input=s, lexer=self.lexer, debug=debug_level)
  File "/usr/lib/python3.9/site-packages/xonsh/ply/ply/yacc.py", line 335, in parse
    return self.parseopt_notrack(input, lexer, debug, tracking, tokenfunc)
  File "/usr/lib/python3.9/site-packages/xonsh/ply/ply/yacc.py", line 1122, in parseopt_notrack
    p.callable(pslice)
  File "/usr/lib/python3.9/site-packages/xonsh/parsers/base.py", line 2643, in p_subscriptlist
    elts=[p1.value] + [x.value for x in p2],
AttributeError: 'List' object has no attribute 'value'
Failed to load xontrib xlsd.

It looks like an error in xonsh's parsing, as I'm no longer using the List type in the latest version of xlsd

9 replies
Rit
@RitikShah
Hi all!

I'm getting used to xonsh, just started playing w/ it last nite and had some questions about the .xonshrc file. Can I separate my .xonshrc file into multiple files and source them all in one location. it's getting a little hectic in here.

I was also wondering if there was syntax highlighting for sublime text?

5 replies
halloleo
@halloleo
@RitikShah You certainly can! Use the source builtin. I have in my .xonshrc something like this:
$MY_XONSHRC_ADDONS=g`~/.xonsh/*.xsh`
for f in $MY_XONSHRC_ADDONS:
    source @(f)
Rit
@RitikShah

image.png

I'm having a ton of fun with this shell! I tried out the onedrive extension and extended the csv example to use rich to render a pretty table!

anki-code
@anki-code
Very nice =)
Give a star to the xonsh repo and tweet about it :) It will help to increase the community and make more and more great features :)
eode
@eode
Is 'avox' not working right now, or is there some local reason I'm having issues?
Everything seems to work fine except for automatically entering/exiting the venv as I enter/exit the dir.
eode
@eode
Startup requirements changed.
FIxed.
halloleo
@halloleo
@anki-code Very funny! Maybe not a working program to mine bitcoins, but certainly nicely indented. 😉
halloleo
@halloleo
Hi all, I have an annoying issue with xonsh and setting the screen width for subsequent commands via stty. See on StackOverflow "Why does stty cols 40 have different effects in the two shells bash and xonsh"). If anyone knows how to fix this, please answer. It has a bounty on it. 😄 Thanks!
Rit
@RitikShah

Hello all, I've been tinkering around with my rc file and I wanted to add a toggle_python command.

Essentially, it would hide the prompt bar (which I think I can override the $PROMPT). It would also look at all of the python variables I declare (like via def or just variables) and delete them. I think I could do that via looking at locals() and then removing everything that's extra.

The thing is, I don't know if the event triggers for a python command or I'm wondering if this is even a decent idea haha. Thanks all

6 replies
Rit
@RitikShah
Have you all thought about a xonsh Discord?
4 replies
Cadair
@cadair:cadair.com
[m]
or matrix 😉 (which is linked to Gitter now)
anki-code
@anki-code
:newspaper: xonsh-cheatsheet is extremely improved! If you like and use xonsh the cheatsheet contains the basis you should know about xonsh.
anki-code
@anki-code
:new: xontrib-history-encrypt - the xontrib that implements xonsh history backend with encryption.
anki-code
@anki-code
:newspaper: Floks! Now we have Github Discussions for the questions - https://github.com/xonsh/xonsh/discussions :tada:
Walter A. Boring IV
@hemna
Just discovered xonsh today. awesome!
hemna
@hemna:matrix.org
[m]
is there a way to get tab completion for directory changes to work?
like cd t<TAB>
1 reply
currently, I have to hit cd t<right arrow>
hemna
@hemna:matrix.org
[m]
that's not working for me. I hit cd d<tab> (looking for my devel directory) and I get nothing. literally nothing happens.
hemna
@hemna:matrix.org
[m]
So it works on my linux box with the same ~/.xonshrc, but not on my mac. mac fails to do cd d<tab>
12 replies
hemna
@hemna:matrix.org
[m]
the output in linux is much longer, same ~/.xonshrc
hemna
@hemna:matrix.org
[m]
I tried removing xonsh with brew and reinstalled from a pyenv environment on my mac and basically get the same issue.
╰─ (eu-de-2)  ± xonsh
Traceback (most recent call last):
  File "/Users/i530566/.pyenv/versions/3.8.5/lib/python3.8/site-packages/xonsh/main.py", line 421, in main
    sys.exit(main_xonsh(args))
  File "/Users/i530566/.pyenv/versions/3.8.5/lib/python3.8/site-packages/xonsh/main.py", line 459, in main_xonsh
    shell.shell.cmdloop()
  File "/Users/i530566/.pyenv/versions/3.8.5/lib/python3.8/site-packages/xonsh/ptk_shell/shell.py", line 338, in cmdloop
    line = self.singleline(auto_suggest=auto_suggest)
  File "/Users/i530566/.pyenv/versions/3.8.5/lib/python3.8/site-packages/xonsh/ptk_shell/shell.py", line 307, in singleline
    line = self.prompter.prompt(**prompt_args)
  File "/Users/i530566/.pyenv/versions/3.8.5/lib/python3.8/site-packages/prompt_toolkit/shortcuts/prompt.py", line 1013, in prompt
    return self.app.run(set_exception_handler=set_exception_handler)
  File "/Users/i530566/.pyenv/versions/3.8.5/lib/python3.8/site-packages/prompt_toolkit/application/application.py", line 848, in run
    return loop.run_until_complete(
  File "/Users/i530566/.pyenv/versions/3.8.5/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
    return future.result()
  File "/Users/i530566/.pyenv/versions/3.8.5/lib/python3.8/site-packages/prompt_toolkit/application/application.py", line 815, in run_async
    return await _run_async2()
  File "/Users/i530566/.pyenv/versions/3.8.5/lib/python3.8/site-packages/prompt_toolkit/application/application.py", line 791, in _run_async2
    result = await _run_async()
  File "/Users/i530566/.pyenv/versions/3.8.5/lib/python3.8/site-packages/prompt_toolkit/application/application.py", line 669, in _run_async
    self._pre_run(pre_run)
  File "/Users/i530566/.pyenv/versions/3.8.5/lib/python3.8/site-packages/prompt_toolkit/application/application.py", line 626, in _pre_run
    c()
  File "/Users/i530566/.pyenv/versions/3.8.5/lib/python3.8/site-packages/prompt_toolkit/shortcuts/prompt.py", line 1202, in pre_run2
    pre_run()
  File "/Users/i530566/.pyenv/versions/3.8.5/lib/python3.8/site-packages/xonsh/ptk_shell/formatter.py", line 69, in start_update
    self.updator.start()
AttributeError: 'PTKPromptFormatter' object has no attribute 'updator'
Xonsh encountered an issue during launch
Failback to /bin/zsh
hemna
@hemna:matrix.org
[m]
I just created a new pyenv environment (3.8.7) and installed xonsh and it's all working now.
anki-code
@anki-code
:new: New xontrib-linuxbrew - Add Homebrew's shell environment to xonsh shell on Linux.