Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Apr 12 20:34
    gforsyth commented #4215
  • Apr 12 19:40

    gforsyth on main

    Put history json to subdirector… (compare)

  • Apr 12 19:40
    gforsyth closed #4211
  • Apr 12 19:37

    gforsyth on main

    Improve bash completions - Pass… (compare)

  • Apr 12 19:37
    gforsyth closed #4219
  • Apr 12 19:31

    gforsyth on main

    feat: Added environment variabl… (compare)

  • Apr 12 19:31
    gforsyth closed #4221
  • Apr 12 19:31
    gforsyth closed #4021
  • Apr 12 16:35
    initdc starred xonsh/xonsh
  • Apr 12 09:31
    exc4l starred xonsh/xonsh
  • Apr 12 07:00
    anki-code commented #4224
  • Apr 11 18:25
    coolgreenhat starred xonsh/xonsh
  • Apr 11 13:39
    joe-no-body starred xonsh/xonsh
  • Apr 11 10:50
    anki-code commented #4230
  • Apr 11 10:49
    anki-code closed #4230
  • Apr 11 10:24
    jmoranos commented #4230
  • Apr 11 08:54
    anki-code commented #4230
  • Apr 11 08:20
    driverding starred xonsh/xonsh
  • Apr 11 05:32
    anki-code commented #4224
  • Apr 11 05:00
    anki-code commented #4230
pickle_jam
@pickle_jam:matrix.org
[m]
yeah I'm literally not competent enough to import even a single function
|RePa|
@dyuri:horak.hu
[m]
if you create a proper, installable xontrib, and install it on your host, it will most probably work
you don't need to publish it, just install with pip
pickle_jam
@pickle_jam:matrix.org
[m]
Thank you! I have been using the cookiecutter templates, and unfortunately that has yet to work. Is it plug-and-play or do I need to manually need to update everything in the init?
|RePa|
@dyuri:horak.hu
[m]
I don't remember manually updating much
pickle_jam
@pickle_jam:matrix.org
[m]
alright so in scripts, I run the cookiecutter in the (dir)Test. It makes a subdirectory (dir)Test->Project for me. Do I do xpip install xontrib-Project at the Test, Project, or xontrib directory?
It raises two ERRORs. "Could not find a version that satisfies the requirement xontrib-Project" and "No matching distribution found for xontrib-Project"
Is it better if I install xonsh through pip as opposed to through my package manager?
|RePa|
@dyuri:horak.hu
[m]
first of all, I'd not use capital letters in project names
check the example part of the readme of the xontrib cookiecutter
pickle_jam
@pickle_jam:matrix.org
[m]
I read it, I'm still struggling to actually get it to work but the example does seem to be helping some. It seems I missed a crucial part of the build process with the poetry toolchain. 🤦‍♂️
poetry build is failing because 'xontrib is not a package'
pickle_jam
@pickle_jam:matrix.org
[m]
I got it to build by messing around with the module names, now I just need to figure out how to install it
I think I got it
|RePa|
@dyuri:horak.hu
[m]
standing in the xontrib's folder and issuing pip install --user . (or something like that) should do it
Andy Kipp
@anki-code
The cookiecutter template has detailed example of how to make and install xontrib - https://github.com/xonsh/xontrib-cookiecutter
Also it has xontrib promotion section in the readme - https://github.com/xonsh/xontrib-cookiecutter/tree/main/%7B%7Bcookiecutter.project_repo_name%7D%7D
Finally there are huge amount of open sourced xontribs that could be an examples - https://github.com/topics/xontrib
pickle_jam
@pickle_jam:matrix.org
[m]
yeah I finally solved my woes, thank you all for your help... and I don't know what it was, I just straight-up did not see one or two important commands and flags to solve my issue
I very much do appreciate you guys reaching out tho
I think I've figured out Kitty + xonsh is my favorite shell stack
yakuake is also very good though
Andy Kipp
@anki-code
JFYI there is an upstream issue in Kitty + prompt-toolkit (that xonsh uses) - xonsh/xonsh#4194
I prefer Konsole (Yakuake uses Konsole) as time tested solution for me.
pickle_jam
@pickle_jam:matrix.org
[m]
over Kitty?
Andy Kipp
@anki-code
instead of kitty )
pickle_jam
@pickle_jam:matrix.org
[m]
the biggest draw-factor to Yakuake for me is the screen-toucht-to-summon feature
|RePa|
@dyuri:horak.hu
[m]
I still prefer kitty
Andy Kipp
@anki-code
I'm not the big user of kitty and may be it's better than konsole in fact. Just wanted to let you know about known issue.
|RePa|
@dyuri:horak.hu
[m]
well, I blame prompt_toolkit for anything similar
Andy Kipp
@anki-code
))
|RePa|
@dyuri:horak.hu
[m]
they broke right prompt months ago
and the PR that fixes it might never gonna make it
Andy Kipp
@anki-code
Is there a link to the issue/pr?
|RePa|
@dyuri:horak.hu
[m]
prompt-toolkit/python-prompt-toolkit#1241 (you already mentioned this in a starship related discussion)
prompt-toolkit/python-prompt-toolkit#1271 this PR fixes this issue (and other completion menu related ones)
for me at least
Andy Kipp
@anki-code
The kind reminder has been added :)
halloleo
@halloleo

Strange probelm: When I interrupt an on the xonsh commandline long running for-loop (something like:

for f in open('filelist.txt'):
     grep -H "MySearchTerm" @(f.strip())

) with a SIGINT signal, then I get sometimes in the xonsh shell the error:

>$ RecursionError: maximum recursion depth exceeded in comparison

Any idea why?

2 replies
alat-rights
@alat-rights

Hey everyone, hope you’re well.

having a weird issue with Xonsh. Tried to write a little program to move files, and its failing with “name file is not defined”

image.png
dyuri
@dyuri:horak.hu
[m]
files.txt in for filename in files.txt: is interpreted as a python variable and it isn't defined ineed
alat-rights
@alat-rights
oh gosh! That’s silly of me. Thanks for letting me know.
dyuri
@dyuri:horak.hu
[m]
you can do something like
for filename in $(cat files.txt).split("\n"):
(strange issue, I can't see the attached image in my matrix client)
Andy Kipp
@anki-code
The best way is to use splitlines instead of split and stripping:
for filename in $(cat files.txt).splitlines():
    mv @(filename) misc/
    # OR explicitly:
    $[mv @(filename) misc/]
@alat-rights I recommend to read the xonsh cheatsheet - it's good start.
alat-rights
@alat-rights
Awesome, thank you!
alat-rights
@alat-rights
Ok one more question, do you guys know how I can get tmux to auto-start xonsh at startup?
1 reply
Cadair
@cadair:cadair.com
[m]
Use default-shell not default-command as I found out the hard way.
eggcaker
@eggcaker
Any one use xonsh on Windows w/o wsl , seems it cant run very well always like Linux os