Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 15:01
    gforsyth commented #4120
  • 15:01

    gforsyth on master

    Added xontrib-history-encrypt (… (compare)

  • 15:01
    gforsyth closed #4120
  • 14:40
    gforsyth commented #4103
  • 14:13
    anki-code review_requested #4121
  • 12:57
    codecov-io commented #4121
  • 12:38
    anki-code synchronize #4121
  • 12:29
    anki-code synchronize #4121
  • 12:02
    anki-code synchronize #4121
  • 11:56
    anki-code synchronize #4121
  • 11:41
    anki-code opened #4121
  • 08:12
    Logistic98 starred xonsh/xonsh
  • 05:19
    anki-code review_requested #4120
  • Feb 25 21:26
    rsteube commented #4103
  • Feb 25 19:21
    anki-code edited #4120
  • Feb 25 19:12
    anki-code labeled #4119
  • Feb 25 19:12
    anki-code unlabeled #4119
  • Feb 25 19:11
    anki-code synchronize #4120
  • Feb 25 19:10
    gforsyth commented #4120
  • Feb 25 18:57
    anki-code review_requested #4120
anki-code
@anki-code
:new: I've created awesome-xonshrc to collect best practices around .xonshrc. Feel free to add your lovely snippets!
1 reply
matrixbot
@matrixbot
Swedneck (@swedneck:feneas.org) has anyone tried using nix with xonsh as the shell?
Swedneck (@swedneck:feneas.org) (not nixOS, mind, just nix the package manager)
halloleo
@halloleo
@anki-code I'm super-interested in the same stuff: For debug printing of what actual commands a xonsh script executes, it would help a lot to know the python expressions in a subprocess mode line!
5 replies
Chris Braun
@cryzed
I made a small script to transfer the JSON history into the sqlite database, when switching to the sqlite history backend: https://gist.github.com/cryzed/dbb877ed814fc1c83bc3486d55235a1e
7 replies
halloleo
@halloleo
Hi! Good news, due to the awsome emacs-libvterm I finally might eb able to join the club of sophisticated prompt-toolkit users. :-)
Now I'm looking for keyboard shortcuts. I found the page in the doco, but surely there are more shortcuts (like <right> to accepts prompt-toolkits history suggestion). Are they listed somewhere?
5 replies
Noorhteen Raja NJ
@jnoortheen
an intiative to add xonsh editor support - https://github.com/jnoortheen/vscode-xonsh
anki-code
@anki-code
Great! It's a good start! Thanks! :tada: :tada: :tada: :tada: :tada: :tada:
Anthony Scopatz
@scopatz
Amazing! Thanks @jnoortheen!
Anthony Scopatz
@scopatz
Hey All! I would really love to get a release out today/this week, but I think we need to get xonsh/xonsh#3850 merged in first
15 replies
CaféHaine
@cafehaine
I think I should implement the better warning for the deprecation as mentioned here xonsh/xonsh#3793
Anthony Scopatz
@scopatz
Happy to review PRs! :wink:
anki-code
@anki-code
Happy to see you on board Anthony =)
Anthony Scopatz
@scopatz
haha :ship:
CaféHaine
@cafehaine
looks like my last patch accidentally removed the deprecation warning. welp.
CaféHaine
@cafehaine
I'm trying to determine in color_tools.py if xonsh is running with XONSH_SHOW_TRACEBACK, however after looking at print_exception in tools.py, I think it might be better to extract that code and put it in another function, something like should_show_traceback, and get_traceback_logfile
since it's quite lengthy and it might be useful outside of tools.py
Anthony Scopatz
@scopatz
tools is pretty close to the bottom of the stack, but another function is always welcome!
salotz
@salotz
is there anything like a subshell in xonsh?
I do this in bash/sh:
(cd $DIR &&
 wget $url &&
  unzip $filename)

But as far as syntax why do you need the line continuation inside braces for this kind of thing?

(echo "hello" and \
     echo "there")

without the \ I get a syntax error

Anthony Scopatz
@scopatz
You could try something like xonsh -c! echo "hello"
Anthony Scopatz
@scopatz
If anyone on @xore is available, I'd love a review on xonsh/xonsh#3850 in order to get the next release out. Thanks!
Anthony Scopatz
@scopatz
Happy to announce 0.9.23 is out!
5 replies
anki-code
@anki-code
We did it! :tada: :tada: :tada: :+1: :muscle:
wendellwt
@wendellwt
good for 0.9.23! Q: can I change the behavior of existing tab-completers? Or to get something slightly different, do I need to write my own completer function? I would like argument-completion to look in the current directory first, but current completers don't seem to do that.
3 replies
anki-code
@anki-code
:new: New xontrib-sh - paste and run sh-compatible (bash/zsh/fish) commands in xonsh. Just start with ! and paste the commands to execute. The shell (bash/zsh/fish) will be found automatically.
Anthony Scopatz
@scopatz
:tada:!
Austin Bingham
@abingham
When I use xontrib load vox_tabcomplete I trigger an assertion ("/usr/local/Cellar/xonsh/0.9.23/libexec/lib/python3.9/site-packages/xonsh/parsers/base.py", line 2215, in apply_trailers assert False). Any idea what's going on?
2 replies
eggcaker
@eggcaker
hi all, is there a way to capture the command result , i has a cmd build with python mode like : cmd = 'ssh user@sshserver.com cat ~/myfile' , then i want to capture the result the cmd returns , but if i ran ``` result = $(@(cmd)) i got command not found
Anthony Scopatz
@scopatz
@eggcaker - in that example, cmd should be a list of str.
cmd = 'ssh user@sshserver.com cat ~/myfile'.split()
$(@(cmd))
should work
eggcaker
@eggcaker
@scopatz how about pipeline ?
Anthony Scopatz
@scopatz
I think it would have to be something like $(@(cmd1) | @(cmd2))
eggcaker
@eggcaker
mean , I cannot include the "|" inside the cmd
Anthony Scopatz
@scopatz
That's right. The pipe joins commands
eggcaker
@eggcaker
like : cmd = '.... myfile | rg my_search'.split()?
Anthony Scopatz
@scopatz
At least, that is how it is implemented now
You could use execx or similar to execute a block of code, but that wouldn't capture in the way that you want
hmmm actually
You might be able to create an ExecAlias out of the command, and then capture the alias
This is little hacky but it would look something like:
aliases['__my_piped_cmd__'] = '.... myfile | rg my_search'
$(__my_piped_cmd__)
I haven't tried that, but it might work
eggcaker
@eggcaker
yes , i known that way, it's works well, this time i just write some script quickly just want concat the command generate with python loop and run that command capture the result
David Strobach
@laloch
The following forks for me:
$ cmd = "cat ~/.xonshrc | grep '^$.*='"
$ execx(f"cmdout=$({cmd})", glbs=globals())
$ echo @(cmdout)
eggcaker
@eggcaker
Thanks @laloch this way works
eggcaker
@eggcaker
with $(@(cmd1) | @(cmd2)) seems not working
wait .. maybe not ...
eggcaker
@eggcaker
@scopatz $(@(cmd1) | @(cmd2)) works too ,my bad thanks @scopatz @laloch
Anthony Scopatz
@scopatz
cool thanks!