Live data from Hacker News

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

xon.sh

11–20 of 97 posts

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

#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?

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

#13
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!

If vim plugins are the only thing holding you back you might want to consider just adding set shell=/path/to/bash to your vimrc and see how you get along.

I current have that set in vim when using fish shell.

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

#15
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?

Python variables are scoped as normal, so the security story for xonsh is the same as for Python. We are always open to suggestions and PRs to harden the code base as needed.

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

#16
Love xonsh!! And gets more and more stable with every release.

it's the shell I always wanted. And cross platform to boot.

Alias ls -l?

aliases['ls'] = "ls -l"

Oops no I don't want that any more:

del aliases['ls']

Add dir to path:

$PATH.append('/foo/bar')

Just the awesome python syntax sugar and readbility right in the

May I never right a bash script again.

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

#18

Love xonsh!! And gets more and more stable with every release. it's the shell I always wanted. And cross platform to boot. Alias ls -l? aliases['ls'] = "ls -l" Oops no I don't want that any more: del aliases['ls'] Add dir to path: $PATH.append('/foo/bar') Just the awesome python syntax sugar and readbility right in the May I never right a bash script again.

del aliases[‘ls’] seems like a step back from unalias ls.

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

#20

Love xonsh!! And gets more and more stable with every release. it's the shell I always wanted. And cross platform to boot. Alias ls -l? aliases['ls'] = "ls -l" Oops no I don't want that any more: del aliases['ls'] Add dir to path: $PATH.append('/foo/bar') Just the awesome python syntax sugar and readbility right in the May I never right a bash script again.

del aliases[‘ls’] seems like a step back from unalias ls.

Sure, but aliases is a real mapping object that you can access and manipulate
Post reply on HN