Live data from Hacker News

Xonsh: Python-powered, cross-platform, Unix-gazing shell

xon.sh

61–70 of 97 posts

Re: Xonsh: Python-powered, cross-platform, Unix-gazing shell

#61

Earlier quoted context omitted.

You know it's a pun on conch shell, right? ;-)

Wouldn't it make more sense if it was called "Ponsh" then? Heck, now that I think of it, "posh" would be a perfect name for a Python-powered shell.

Perhaps “pysh”, although that has some negative connotations.

Re: Xonsh: Python-powered, cross-platform, Unix-gazing shell

#63

Earlier quoted context omitted.

You know it's a pun on conch shell, right? ;-)

Wouldn't it make more sense if it was called "Ponsh" then? Heck, now that I think of it, "posh" would be a perfect name for a Python-powered shell.

PowerShell went for "pwsh" instead of "posh" because posh is already a name of a shell - https://www.commandlinux.com/man-page/man1/posh.1.html

Re: Xonsh: Python-powered, cross-platform, Unix-gazing shell

#64
post #2

Xonsh is awesome! Execute Python directly on the command line?! Sign me up! Sadly it doesn't play well with all of my three thousand various vim plugins, so I still haven't been able to use it as my daily shell. Hopefully someday!

lol do you really have 3000 vim plugins?

Re: Xonsh: Python-powered, cross-platform, Unix-gazing shell

#65

XonSH has been my main shell for a solid two years now. The concept is awesome, but unfortunately it has many flaws. * Nesting bash and python scripts makes performance terrible compared to using python's subprocess module directly. I have a xonsh script at [0], with an equivalent written in straight bash. The python scripts ends in less than a second, the xonsh script takes ages. - As a sub-problem of the above: You…

Filed https://github.com/xonsh/xonsh/issues/2815

$ yes test | tee /tmp/xonsh.log

$ wc -l /tmp/xonsh.log

  208076 /tmp/xonsh.log
bummer ctrl+c does eventually work several seconds later (about 10x slower) which is still a deal breaker as it could be disastrous when you need to abort a mistyped command or for scripts that give you a few seconds to abort before it does something the destructive step...

Re: Xonsh: Python-powered, cross-platform, Unix-gazing shell

#66

XonSH has been my main shell for a solid two years now. The concept is awesome, but unfortunately it has many flaws. * Nesting bash and python scripts makes performance terrible compared to using python's subprocess module directly. I have a xonsh script at [0], with an equivalent written in straight bash. The python scripts ends in less than a second, the xonsh script takes ages. - As a sub-problem of the above: You…

I use zsh daily but type `xonsh` any time I do something in the shell that would normally require a google.

“Uh ok so I have this JSON file. When I pipe this to `jq` I forget: to pivot an array of objects to an object keyed by array[x].id is it like `to_entries` then chain it to `map`? Uhh let’s look at the docs...”

However in Python I can write that function at the speed of thought. It may be a couple more lines of code but I’m also 100% confident in the output.

Like I understand some people can legitimately program in bash [0]. But I just can’t bring myself to practice. Why would anyone inflict this language on themselves?

[0] https://github.com/docker-library/python/blob/master/update....

Re: Xonsh: Python-powered, cross-platform, Unix-gazing shell

#68
post #24
post #12

Sounds neat. However, the fact that `ls -l` either subtracts two numbers or calls a shell command, depending on whether there exist valriables 'ls' and 'l' in the Pythom environment, looks like a security nightmare waiting to happen. What if I create a python object 'ls' deep inside a script that does Evil when subtracted from?

What's stopping a Bash script from doing something similar? You could alias ls to a malicious actor for example.

I mean, that's the underlying concept behind the fork bomb isn't it? With ":() { :|:&}" you're essentially redefining the bash noop to be a function that pipes/forks itself into itself recursively.

It's the reason './' is not in the default path as well (so you can't place an 'ls' in your home directory and have the admin run your command instead of the real ls).

Re: Xonsh: Python-powered, cross-platform, Unix-gazing shell

#69
post #60

I've always been thinking there can be a better shell like having a split pane to show the list of command options with descriptions as you start typing in the command or show snippets of a preset of command options that does task X as in search by use case instead of going to stackoverflow every time. I think the way people handle shell, as in typing commands on a dumb shell, has not improved for decades and I don't…

I really like fish. It doesn't open a split pane, but it can show lists of command switches in tab complete based on man pages.

I'm really tempted to try xnosh again as my daily driver for a few weeks though. I like the idea of typing out arbitrary Python code without spawning up IPython.

The problems people seem to be stating about xonsh were similar to a lot of the early bugs with Fish, but those things tend to go away once more people start using the shell and reporting issues.

I hope we got a whole new generation of usable shells with xonsh, oil and fish.

Re: Xonsh: Python-powered, cross-platform, Unix-gazing shell

#70
post #41

I love the concept, and I am generally happy with how it works. I think it should catch on. Except the damned name. Come on guys , there are already enough crazily named things out there, you didn't have to be another one :(

ehh.. I keep wanting to call it "nosh" or spell it "xnosh" but I'm sure if it catches on people will remember. Plus it's easy to use with a search engine, unlike "Go" or "Rust."

I will say I prefer names that can be searched for on their own (e.g. with Go people typically search for "Go lang").

And as much as I love Void Linux, it's better named than all the xbps-* package manager commands.

Post reply on HN