Xonsh: Python-powered, cross-platform, Unix-gazing shell
21–30 of 97 posts
Re: Xonsh: Python-powered, cross-platform, Unix-gazing shell
#22Re: Xonsh: Python-powered, cross-platform, Unix-gazing shell
#23Sounds 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
#24Sounds 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
#25Sounds 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
#26Love 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.
For me, it's easier to remember that aliases acts like a dictionary, so I can treat it like any other dictionary. With "unalias" I have to remember the command. As I rarely use unalias (a few times over a period of years), I typically have to search the web on how to remove an alias.
And if it really bothers you, I'm pretty sure it's trivial to define an unalias function in Xonsh that will act as you expect (without needing parentheses).
It's part of the beauty of Xonsh - many such commands you're used to can be brought into it by writing fairly simple Python code.
Re: Xonsh: Python-powered, cross-platform, Unix-gazing shell
#27Sounds amazing. If it ever gets a relatively active plugin ecosystem like zsh or fish, I'd definitely switch. Being able to write shell functions in Python would be very refreshing. If they want bigger adoption, dedicating a bunch of people who do nothing but port zsh and fish plugins would probably go a long way.
Re: Xonsh: Python-powered, cross-platform, Unix-gazing shell
#28Love 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.
Bash is not going away any time soon, for better or worse..
Re: Xonsh: Python-powered, cross-platform, Unix-gazing shell
#29Sounds 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.