6 ms·
The xonsh shell
- therein 10y agoSounds very useful. I'll give this a try right now on my personal machine and maybe even use it for some build scripts at work later if I like it.
- abstractbeliefs 10y agoLooks good, but can you take more time in the asciinema showcase? The typed variables section for example goes so fast that I can barely read the results, never mind get into the process behind it! I've made a lot of use of the pause button, but it would be great to just be given a little more time to think.
- rkangel 10y agoOn the other hand - it's a fast homepage intro. A rapid showcase to get you interested and make you want to investigate further. I also used the pause in a couple of places (which is OK, that's what it's there for), and I almost certainly wouldn't have bothered watching it if it had been any longer. I personally think this is an excellent example of a landing page. It contains a brief text summary of what the thing is and why you'd want to use it, a quick demo of what it does, and then links to further information.
- cdubzzz 10y ago> On the other hand - it's a fast homepage intro. A rapid showcase to get you interested and make you want to investigate further. But does it work? Here was what happened for me: - The first section disappeared too fast. - I thought that was odd and waited for the second section. - The second section disappeared too fast. - I closed the tab.
- deleted 10y ago[deleted]
- scrollaway 10y agoBeautiful. Absolutely beautiful. Also nice to see it respects XDG basedir. I'll be trying it out today. I've been using zsh for a very, very long time and it's been really hard to get me to switch off it. This looks exciting. My only concern is with ease of installation, especially on eg. debian servers. But that's out of the hands of the project :/
- jdnier 10y agoDitto. Using backticks for Python regex globbing is immediately appealing.
- c4pt0r 10y agoLooks very useful, I think it's time to replace my zsh.
- gear54rus 10y agoI'm not really well-versed in what happens when you replace a shell and then run your programs with it, but can someone ELI5 how does this get away with making 'env variables typed'. How is the program like 'ls' going to see a variable that is an array when originally it was a string delimited with ':'?
- roblabla 10y agoIt will see a string delimited with ':'. The point is that while inside xonsh, your variable is typed, and then xonsh hands the env in the expected way to the subprocesses.
- gear54rus 10y agoSo basically it goes back to string from array by simply unconditionally joining it on a ':'? I guess that makes some sense... But isn't this convention (delimited by ':') only for PATH?
- roblabla 10y agoMost path arrays are :-concatenated on unixes (RPATH, LD_PRELOAD, etc...), so the convention holds for the majority case. There might be a way to specify the serialization of your array somewhere, but I can't find it in the doc.
- klibertp 10y agohttps://docs.python.org/2/library/os.html#os.pathsep https://docs.python.org/2/library/os.html#os.pathsep
- rkangel 10y agoThe convention holds for other lists too (usually lists of directories). The important thing is that there is a similar but different convention on Windows (';' is used), and xonsh abstracts that away in the same way Python does.
- BlanketLogic 10y ago
- albertzeyer 10y agoEarlier discussion: https://news.ycombinator.com/item?id=9207738 https://news.ycombinator.com/item?id=9207738
- donnemartin 10y agoThe xonsh Xontrib [1] open pull request sounds handy, allowing devs to extend the functionality of xonsh beyond what is provided by default. As an example, gitsome [2] is powered by xonsh and might have benefitted from Xontrib. I've found that xonsh + prompt-toolkit [3] is a nice combo that helps autocomplete the following: * Shell commands * Files and directories * Environment variables * Man pages * Python (REPL too) [1]: https://github.com/scopatz/xonsh/pull/829 https://github.com/scopatz/xonsh/pull/829 [2]: https://github.com/donnemartin/gitsome https://github.com/donnemartin/gitsome [3]: https://github.com/jonathanslenders/python-prompt-toolkit https://github.com/jonathanslenders/python-prompt-toolkit
- hbrid 10y agoInteresting but I haven't seen any killer feature yet that makes me want to get accustomed to this shell. Command level completion for arguments has existed in zsh, aliases being a sort of dictionary is kind of interesting but not too useful (just some familiar syntactic sugar). Mutliline input isn't new, csh can do it, bash can do it, so can zsh. Admittedly the ability to duck type and evaluate numerical expressions with "let" is kind of nice but nothing too special. Regexes for globbing files might be a new one, certainly a useful one that I'd otherwise be writing special awk or python to handle.
- creshal 10y ago> Regexes for globbing files might be a new one Regexes in particular are new AFAIK, but zsh's extended globbing is already extremely powerful: http://www.refining-linux.org/archives/37/ZSH-Gem-2-Extended-globbing-and-expansion/ http://www.refining-linux.org/archives/37/ZSH-Gem-2-Extended... Bash also comes close, iirc. But we use shells because of their ubiquity, not because of how nice scripting languages they are (they aren't). So I don't see myself ever using xonsh – I'm already glad when a system has bash and I don't have to figure out what "posix /bin/sh compliant" is supposed to mean this week.
- brodo 10y agoI think the big plus is that you can use a proper programming language in the shell.
- TallGuyShort 10y agoI've longed for a language that can run both pipelines of commands with the conciseness of UNIX shells and have control structures and arithmetic as elegantly as Python...
- RVuRnvbM2e 10y agoThat language is Ruby.
- 10y ago
- gbajson 10y agoLooks really good, it's Yet Another Fantastic Shell! I'd love to use it, really. But as long as it's not shipped by default with a popular Linux releases, I will not. My customers, Telcos, don't approve any "non standard" software in their server rooms.
- deathanatos 10y agoThe domain at the end of the video (http://xonsh.org http://xonsh.org) doesn't seem to point to your site (http://xon.sh http://xon.sh) (and doesn't work, either…). Just FYI, that if you share the video, you might want to share the link, too. (or, for xon.sh, it may be time to update the video. I presumed you moved to the fancier domain at some point.)
- Shizka 10y agoHow does this compare to cmder on Windows?
- ygra 10y agoNot at all, they're completely different things.
- andr 10y agoThat's lovely! Would really love some docs on how developers can extend this! Am I missing something to enable smart autocomplete? $ git c<tab> completes to a folder, starting with c. $ git cl<tab> does nothing. (OS X, installed with pip.)
- BYK 10y agoI have this for starters: https://gist.github.com/BYK/66dfd985491b483bd140 https://gist.github.com/BYK/66dfd985491b483bd140
- Kurtz79 10y agoTo be fair, the flattering comparison table should come with things like "Natively supported by the OS" or "Large community support", for which xonsh would obviously be at a disadvantage compared to other shells.
- maxaf 10y agoWhile I have little basis for technical disagreement with your statement, I still think the attitude of "not used much - can't adopt it" is detrimental to FOSS in general and to high-touch "hand tools" such as shells in particular. How else will we discover new stuff if we won't venture out into the unknown? :)
- Kurtz79 10y agoI agree completely, I'm just saying it's a factor that should be considered, like many others, when making a comparisons with other shells.
- IshKebab 10y agoPython doesn't have large community support?
- thevibesman 10y ago> "Natively supported by the OS" But this all depends on the OS; OS X only gives you an old version of BASH as the default shell and OpenBSD (and possibly other BSDs) require installing BASH through the ports tree.
- jlarocco 10y agoOSX also comes with zsh. I haven't looked in a while, but last time I checked, the version of zsh was significantly newer than the version of BASH, because of the GPL issues around Bash.
- scopatz 10y agoTotally agree that the comparison table is flattering. The purpose of the front page for a project is to make it look good. This is one of the few places a project has that opportunity. Happy to update it if you notice any thing wrong or would like to see additional rows or columns.
- gkya 10y agoI'm baffled with the effort people put for writing _g_ and not writing _it_. Now I'm incredibly fond of path completion, but I guess it shouldn't be the shell to do that, but the terminal, because the function is generic, i.e. whathever shell one uses, it is beneficial. Emacs/Comint does that, and it's comfortable and predictable.
- 0942v8653 10y ago> I guess it shouldn't be the shell to do that, but the terminal How would this work over SSH? What if you're using a temporary shell as another user? Also, the terminal really shouldn't have to know what is going on in the shell in order to work reliably. Tools like tmux, screen… should not have to perform directory completion.
- gkya 10y agoThere can be a single pathcompd service that does ipc too. Or maybe that can be left to readline, etc. I don't see why a command interpreter should do line editing/path completion in and of itself.
- hiimnate 10y agoThe feature set is very interesting, but I tried it out on my machine, and it's just too slow for me. I'm sticking with ZSH.
- niroze 10y agoIt is nice to have new projects in the world. Personally, I just don't get what it solves that can't be solved with shells and programming languages pre-installed on every machine already. From a personal workstation/development box shell (I used GNU Emacs for dev/mail/usenet for over a decade), I can understand but for servers this may not be appropriate. It is "cool" but I'd argue that most geeks don't even fully understand installed tools on their current machines, so this is "interesting" at best. It was someone's project to learn programming? I may be being negative, but "meh".