Author Topic: xonsh shell  (Read 787 times)

0 Members and 1 Guest are viewing this topic.

Offline rincewind

  • Peasant
  • *
  • Posts: 59
  • Cookies: 17
  • Hello
    • View Profile
xonsh shell
« on: October 27, 2015, 12:04:30 am »
http://xonsh.org/
found right now, never tried it seems cool I think some people here will like it :P
asdf

Offline fayesafe

  • /dev/null
  • *
  • Posts: 14
  • Cookies: 4
    • View Profile
Re: xonsh shell
« Reply #1 on: October 27, 2015, 12:34:00 am »
Looks nice on first view, even though it's probably not POSIX. Anyways, have you tried using it? How does it feel compared to bash, ksh etc? If you have some experience, you might consider posting to the Unix-Tools-Thread:
https://evilzone.org/operating-system/linuxbsd*nix-tool-thread/
I reserve the right to be wrong. I reserve the right to change my mind.

Offline rogue.hackz

  • Peasant
  • *
  • Posts: 55
  • Cookies: 4
    • View Profile
Re: xonsh shell
« Reply #2 on: October 27, 2015, 06:39:27 am »
Haven't tried xonsh, not sure if it's worth trying.

Currently I run a mod of zsh called OhMyZsh. It has pretty most of the features listed in xonsh and more.

https://github.com/robbyrussell/oh-my-zsh

Most useful feature that I can think of is the advanced history feature that goes through your history files and shows you all the different parameter options for that particular command you've used before with the up and down arrow keys. This saves time cos you don't have to  remember all the different flags and stuff for every command.

Also it supports autocompletion for most built in programs on linux not just for man pages.

I'd want to discuss more but at the moment in a hurry so may be later.
"The only true wisdom is in knowing that you know nothing" -Socrates

Offline TheWormKill

  • EZ's Scripting Whore
  • Global Moderator
  • Knight
  • *
  • Posts: 257
  • Cookies: 66
  • The Grim Reaper of Worms
    • View Profile
Re: xonsh shell
« Reply #3 on: October 27, 2015, 09:01:05 am »
Haven't tried xonsh, not sure if it's worth trying.

Currently I run a mod of zsh called OhMyZsh. It has pretty most of the features listed in xonsh and more.

https://github.com/robbyrussell/oh-my-zsh

Most useful feature that I can think of is the advanced history feature that goes through your history files and shows you all the different parameter options for that particular command you've used before with the up and down arrow keys. This saves time cos you don't have to  remember all the different flags and stuff for every command.

Also it supports autocompletion for most built in programs on linux not just for man pages.

I'd want to discuss more but at the moment in a hurry so may be later.

I am a ZSH user myself, although I regard oh-ma-zsh as useless bloat. And in fact, they slow down your shell by magnitudes of 2 and greater, as some experiments show. On the other hand, the features you named are available on vanilla ZSH with extensions etc. as well, with a smaller speed penality due to the lack of overhead from a framework. That aside, the xonsh looks kinda interesting bcause it seems a lot more powerful in some ways compared to, say bash. But then again, it is not the right kind of power given different perspectives / needs in programming and shellscripting, as xonsh is clearly driven by the programming-with-your-shell paradigm.

I'll add screenshots and details on my shell when I get back home.
Stuff I did: How to think like a superuser, Iridium

He should make that "Haskell"
Quote
<m0rph-is-gay> fuck you thewormkill you python coding mother fucker

Offline rogue.hackz

  • Peasant
  • *
  • Posts: 55
  • Cookies: 4
    • View Profile
Re: xonsh shell
« Reply #4 on: October 27, 2015, 10:25:00 am »
I am a ZSH user myself, although I regard oh-ma-zsh as useless bloat. And in fact, they slow down your shell by magnitudes of 2 and greater, as some experiments show. On the other hand, the features you named are available on vanilla ZSH with extensions etc. as well, with a smaller speed penality due to the lack of overhead from a framework. That aside, the xonsh looks kinda interesting bcause it seems a lot more powerful in some ways compared to, say bash. But then again, it is not the right kind of power given different perspectives / needs in programming and shellscripting, as xonsh is clearly driven by the programming-with-your-shell paradigm.

I'll add screenshots and details on my shell when I get back home.

I never had the time to mess around with Zsh, after I tried Oh-my-zsh everything just worked out of the box and it had all the features that I was interested in which is why I never bothered looking out for other alternatives. By default plain vanilla zsh doesn't have the features I want and that's where Oh-my-zsh shines in my opinion. Of course you can manually install the extensions on plain vanilla zsh and configure it to get the features you're looking for but I value my time and I like the KISS (Keep it Simple Stupid) philosophy. When just one curl command gets everything setup for me why even bother.

In my opinion, the zsh loading time (1-2s) is noticeable when you first start a shell compared to regular zsh (since it loads everything in the background) but after its done loading I don't see much of a difference.

What kind of shell do you use? I find it kind of funny that you can't even run a java jar file from the terminal and you're explaining to me about zsh. Feels more like there's a dual personality at work  ;)

Of course, not everyone knows everything and perhaps I also have a lot to learn from this discussion.

Anyway I'm curious about "programming with your shell paradigm".  I mean how is it any different than your regular bash? If you wanted to run a python script, bash can do that for you. Why do we have to mix bash with python and make a chicken curry out of it if your end goal is to make it behave like Bash.

Also the most important question is how would that improve our overall shell experience?

« Last Edit: October 27, 2015, 11:00:22 am by rogue.hackz »
"The only true wisdom is in knowing that you know nothing" -Socrates

Offline TheWormKill

  • EZ's Scripting Whore
  • Global Moderator
  • Knight
  • *
  • Posts: 257
  • Cookies: 66
  • The Grim Reaper of Worms
    • View Profile
Re: xonsh shell
« Reply #5 on: October 27, 2015, 06:43:25 pm »
I never had the time to mess around with Zsh, after I tried Oh-my-zsh everything just worked out of the box and it had all the features that I was interested in which is why I never bothered looking out for other alternatives. By default plain vanilla zsh doesn't have the features I want and that's where Oh-my-zsh shines in my opinion. Of course you can manually install the extensions on plain vanilla zsh and configure it to get the features you're looking for but I value my time and I like the KISS (Keep it Simple Stupid) philosophy. When just one curl command gets everything setup for me why even bother.
KISS is the opposite of installing a (comparatively) large framework.

In my opinion, the zsh loading time (1-2s) is noticeable when you first start a shell compared to regular zsh (since it loads everything in the background) but after its done loading I don't see much of a difference.
Right, I was talking about loading time.

What kind of shell do you use? I find it kind of funny that you can't even run a java jar file from the terminal and you're explaining to me about zsh. Feels more like there's a dual personality at work  ;)
I use ZSH with a homemade config file, enabling all of it's default features I need, plus rebinding some keys.
You'd have to explain your second point there, as I don't see a reason for you to a) get insulting and b) grab bullshit statements from thin air.

Of course, not everyone knows everything and perhaps I also have a lot to learn from this discussion.

Anyway I'm curious about "programming with your shell paradigm".  I mean how is it any different than your regular bash? If you wanted to run a python script, bash can do that for you. Why do we have to mix bash with python and make a chicken curry out of it if your end goal is to make it behave like Bash.
What I meant was that the shell mentioned by OP is a superset of python, which means you do things in a pythonic way, instead of doing stuff the shell-way. More loops, less patterns for instance.

Also the most important question is how would that improve our overall shell experience?
xonsh? Not sure, I wouldn't use it, to hardcore-pythoistas it might be a wet dream.
« Last Edit: October 27, 2015, 06:44:57 pm by TheWormKill »
Stuff I did: How to think like a superuser, Iridium

He should make that "Haskell"
Quote
<m0rph-is-gay> fuck you thewormkill you python coding mother fucker