Has anyone ever heard of a UNIX shell written in a reasonable language, like Python?
-
11Do you imply that there is something wrong we c, you philistine? – dmckee --- ex-moderator kitten Jan 26 '09 at 02:15
-
2Or, to be less flippant, what makes reasonable in the context, and why? – dmckee --- ex-moderator kitten Jan 26 '09 at 02:16
-
2Just a question: is Python written in a "reasonable" language? – Ingo Jan 11 '12 at 23:30
-
Related: [Can I use Python as a bash replacement?](http://stackoverflow.com/q/209470/95735) – Piotr Dobrogost Dec 20 '15 at 22:29
7 Answers
- Eshell is a Bash-like shell in Emacs Lisp.
- IPython can be used as a system shell, though the syntax is a bit weird (supporting all of Python plus basic sh constructs).
- fish has a core written in C, but much of its functionality is implemented in itself. Unlike many rare shells, it can be used as your login shell.
- Hotwire deserves another mention. Its basic design appears to be "PowerShell in Python," but it also does some clever things with UI. The last release was in 2008.
- Zoidberg is written in Perl and uses Perl syntax. A nice-looking project, shame it seems to have stalled.
- Scsh would be a pain to use as a login shell (an example command from the docs:
(run/strings (find "." -name *.c -print))
), but it looks like a good "Perl in Scheme."

- 48,117
- 14
- 92
- 101

- 3,199
- 21
- 13
iPython (Python) and Rush (Ruby) are shells that are designed for more advanced languages. There's also Hotwire, which is sort of a weird integrated shell/terminal emulator.

- 102,305
- 22
- 181
- 238

- 197,344
- 39
- 212
- 226
-
1Thanks, I didn't know about Rush. I might need to learn Ruby (or re-implement it in Python). – skymt Oct 05 '08 at 01:22
-
From all appearances, Python IS a shell. It runs with #!
and it can run interactively. Between the os
and shutil
packages you have all of the features of standard Unix shells.
Since you can do anything in Python with simple, powerful scripts, you don't really need to spend any time messing with the other shells.

- 384,516
- 81
- 508
- 779
Well, there's emacs, which is arguably a shell written in lisp :)
Seriously though, are you looking for a reimplementation of an existing shell design in a different language such as Python? Or are you looking for a new implementation of a shell language that looks similar to your language of choice?

- 951,095
- 183
- 1,149
- 1,285
There is xon now:
http://xon.sh/tutorial.html#running-commands
PyCon video - https://www.youtube.com/watch?v=uaje5I22kgE

- 2,388
- 21
- 36
Tclsh is pretty nice (assuming you like Tcl, of course).

- 19,598
- 4
- 47
- 69
-
1Well, I'm a philistine about Tcl. You can keep it. – dmckee --- ex-moderator kitten Jan 26 '09 at 02:17
Try rash. It's a shell language written in Racket. It has a nice interactive-friendly syntax. You can embed Rash inside any normal Racket file as well as embedding normal Racket inside Rash. It's extensible and you can define new pipeline operators. It's still alpha quality at the moment, but it's pretty cool. Full disclosure: I wrote it.

- 386
- 3
- 6