Live data from Hacker News

Xonsh, a Python-ish, Bash-compatible shell language and command prompt

xonsh.org

31–40 of 63 posts

Re: Xonsh, a Python-ish, Bash-compatible shell language and command prompt

#31
post #21

Earlier quoted context omitted.

Have you looked at fish? It is in the package repositories everywhere, I think.

Even so, the single most attractive trait of bash is that it ships with almost everything. If I have to write a script on a machine with no internet, then bash is the only option. This its strongest source of staying power.

You would likely have a regular sh, be it bash in "sh-mode" or a real sh, plus likely csh and maybe ksh. You'd probably also have awk, and maybe even perl.

Re: Xonsh, a Python-ish, Bash-compatible shell language and command prompt

#32

I genuinely wish there was an alternative that could gain enough traction to reach critical mass and hopefully start shipping with operating systems. I've never bothered to learn bash because it was always so damned confusing, and I just couldn't get over the idiosyncrasies when playing around with it. I wouldn't mind putting in time to learn something new and actually user-friendly.

Well, if you do ever want to learn the "finer points" of bash, http://wiki.bash-hackers.org/doku.php and http://mywiki.wooledge.org/BashGuide have tons and tons of great info.

Re: Xonsh, a Python-ish, Bash-compatible shell language and command prompt

#33

I'm a lead dev on the fish shell ( http://fishshell.com ) xonsh looks very cool. Shell scripting languages are famously obtuse and underpowered, and we've thought about how to cleanly merge shell scripting with a real language. It's heartening to see an attempt at it. Ambiguous syntax is a sticking point. For example, say the user runs this: [ 1 ] is this constructing a Python list with the value 1, or is it invoking…

> that leaves shell-integration scripts: virtualenv, rbenv, etc. Supporting that stuff is one of the most common requests that the fish shell gets, and one of the most commonly cited reasons for not using fish.

shameless plug, but I made a utility to solve the problem: https://github.com/edc/bass

So you can write `bass source /usr/local/bin/virtualenvwrapper.sh ';' mkvirtualenv env1`, which of course can be shortened with a function.

Re: Xonsh, a Python-ish, Bash-compatible shell language and command prompt

#34
post #26

So, for anyone like me who wanted to install it with pip, but has Python 2.7 as their default (and doesn't want to change for fear of breaking things), do the following (on a Debian based system): curl -O https://raw.githubusercontent.com/pypa/pip/master/contrib/ge... sudo python3.4 get-pip.py sudo mv /usr/local/bin/pip /usr/local/bin/pip3 # optional, adjust line below if ommited sudo pip3 install xonsh ------ then:…

For Debian/jessie it worked nicely for me to just install python3-ply and python3-pip with apt-get and then just do "pip3 install xonsh". Python3 seems to coexist just fine beside the default 2.7.

Re: Xonsh, a Python-ish, Bash-compatible shell language and command prompt

#36

I'm a lead dev on the fish shell ( http://fishshell.com ) xonsh looks very cool. Shell scripting languages are famously obtuse and underpowered, and we've thought about how to cleanly merge shell scripting with a real language. It's heartening to see an attempt at it. Ambiguous syntax is a sticking point. For example, say the user runs this: [ 1 ] is this constructing a Python list with the value 1, or is it invoking…

I'm pretty sure it said "BASHwards-compatible" when I submitted the story to HN, so I guess one of the admins changed the title.

Re: Xonsh, a Python-ish, Bash-compatible shell language and command prompt

#37

Earlier quoted context omitted.

Even so, the single most attractive trait of bash is that it ships with almost everything. If I have to write a script on a machine with no internet, then bash is the only option. This its strongest source of staying power.

You would likely have a regular sh, be it bash in "sh-mode" or a real sh, plus likely csh and maybe ksh. You'd probably also have awk, and maybe even perl.

perl is everywhere, but like python, it's power is in it's modules.

and those are not everywhere.

Re: Xonsh, a Python-ish, Bash-compatible shell language and command prompt

#38

I'm a lead dev on the fish shell ( http://fishshell.com ) xonsh looks very cool. Shell scripting languages are famously obtuse and underpowered, and we've thought about how to cleanly merge shell scripting with a real language. It's heartening to see an attempt at it. Ambiguous syntax is a sticking point. For example, say the user runs this: [ 1 ] is this constructing a Python list with the value 1, or is it invoking…

> Shell scripting languages are famously obtuse and underpowered, and we've thought about how to cleanly merge shell scripting with a real language.

It was called REPL (Interlisp-D, Lisp Machine, Cedar, Oberon), Workspace (Smalltalk), but then UNIX won.

Re: Xonsh, a Python-ish, Bash-compatible shell language and command prompt

#40

I genuinely wish there was an alternative that could gain enough traction to reach critical mass and hopefully start shipping with operating systems. I've never bothered to learn bash because it was always so damned confusing, and I just couldn't get over the idiosyncrasies when playing around with it. I wouldn't mind putting in time to learn something new and actually user-friendly.

Having played with it for about an hour, I think Xonsh might actually be that alternative.
Post reply on HN