Lots of overlap in design goals with fish, except fish also places a premium on users interactively using the shell (which means friendlier in-repl experience but a balancing act when it comes to features). Fish’ auto completions are incredible, too.<p>Best of luck to them. Another interesting shell to check out is elvish, lots of new ideas there (even if awkward to use).<p>(Disclosure: I’m one of the core fish devs/maintainers. Edit: The entire team is awesome and the others deserve virtually all the credit!)
After using fish for 3 years, I'm finding there is very little reason to have my login shell maintain backwards compatibility with bash.<p>The only time I run into issues is when a command expects manipulate environment variables via bash syntax.<p>I think the fish documentation WRT to scripting could be much better, but the language is more elegant than bash or PowerShell IMHO.
The idea to use a real programming language as a shell is a common one but I'm not sure it's really a problem that can be solved without reworking the kernel interface. Whatever you do pipes will still be byte streams, error handling will always be using integer return values, you'll always have stdin, stdout and stderr, job control and signal handling will always work pretty much the same way. The kernel interface exposes an interface, the userland app expect the shell to behave in the certain way, there's not a lot of wiggle room to make things differently in between the two.<p>Not that the POSIX-like shell syntax is not all sorts of clunky and odd but I almost consider it a feature, it's a deterrent to force you to move to a "real" scripting language when the concepts become too complex to express in a shell script.
> However, Python and Ruby aren't good shell replacements in general. Shell is a domain-specific language for dealing with concurrent processes and the file system. But Python and Ruby have too much abstraction over these concepts, sometimes in the name of portability (e.g. to Windows). They hide what's really going on.<p>Excellently put. POSIX shell languages have fantastic capabilities you just can't get in most other languages. I would love to see a more safe, more sane shell language gain enough popularity to change the narrative that "shell scripts are dangerous and impossible to maintain."<p>The contrasts to Python and Ruby made me think of xonsh[1], a Python-based shell that can dynamically switch between Bash-like syntax and standard Python. It's not quite ready to become my daily driver, but I'm still excited about it.<p>[1]: <a href="https://xon.sh" rel="nofollow">https://xon.sh</a>
I essentially solved these problems with fish shell and Julia programming language.<p>For all sorts of interactive stuff I use fish, because it works the way you want for the most common tasks. I can use it to really quickly match and get back previous statements or do a completion.<p>Also much easier to configure and grok than bash, because it has saner syntax and is a simpler shell language.<p>However when writing shell scripts I use a real language like Julia. It integrates very well with the shell world so I don't find it problematic to do this. It is very easy to read output from processes and pipe stuff. Much nicer than say Python or Ruby.<p>You got built in syntax to deal with shell stuff, but then didn't make it crazy so you end up with a mess like perl. Julia is actually a very clean and nice language. Which also happens to blistering fast and have LISP style macros.
I see that this person has opted not to use python 3 because it is 'less-suited to shell-like problems' than python 2.<p>In an effort to understand the reasons for actively choosing against 3, does anyone know what problems those would be?
Finally a modern shell that understands the importance of COMPATIBILITY! This gives it a realistic chance of getting real adoption. Shells like zsh and fish will never get mainstream adoption because they are not compatible with bash.
Love it. I think there's plenty of room for innovation in this space. I'm currently in the process of porting a ~700 line bash script (I didn't write it) to Python. Although longterm I think this will be much better for the project, there are still tradeoffs. There are some things that are just so easy to express in shell language, like composing transformations via pipes. Sure, python can do it, but it feels clunky in comparison to me. I would love to see a language like python (including package ecosystem) written with shell use as a first-class citizen.
I checked out Oil previously which looks nice but more of an incremental improvement over Fish/ZSH rather than a significant evolution (it may have changed since then, this was last year).<p>Im most excited about Elvish shell and the language that's being developed around it. The shell is built with Go and feels super fast compared to my plugin-heavy ZSH. The language design is quite nice too but still very alpha. Looking forward to see what it evolves into...<p><a href="https://github.com/elves/elvish" rel="nofollow">https://github.com/elves/elvish</a>
@chubot: There is one use-case I come across every once in a while:<p><a href="https://stackoverflow.com/questions/356100/how-to-wait-in-bash-for-several-subprocesses-to-finish-and-return-exit-code-0" rel="nofollow">https://stackoverflow.com/questions/356100/how-to-wait-in-ba...</a><p>So whenever you want to do things in parallel there is probably a limit to the number of processes you would like to execute in parallel (e.g. the famous compiler limit formula: number of CPU cores +1). It would be great if Oil could support such a use-case out of the box, as easy parallelism without the ability to artificially limit the number of parallel executions is often useless.
I spent the day making a virtual terminal ... I think the terminal is an unnecessary layer. All program UI is limited by this 40+ year old technology that is the terminal. Instead of making a new shell, make a shell + <i>new</i> user-interface.
A little tangential, but I keep wondering if Apple is developing its own shell or will adopt one with a more liberal licence such as Oil or Fish.<p>I mean, they can't keep using Bash 3 forever, right? (Hope)
Ignore the naysayers. I have encountered them when posting my shell activities. You're doing great! Can't wait to try the final release. Maybe even get it into my workflow.
So many shells, but how come the virtual terminal hasn't got a revamp or popular alternative? I'd like to see more control over keybinding (e.g. on my machine pressing ctrl+del sends the same character as pressing ctrl+backspace). I understand this would be more a kernel change than a userland one.<p>Screen tiling and visual 'tabs' would also be welcome additions. Not everyone needs a graphic environment, and I refuse to install X just for better keyboard shortcuts on my terminal.
Sounds pretty cool and everybody who had to learn bash scripting at some point understands why we need a sane language (my favorite are misplaced spaces in if statements...; Disclaimer: I do and love bash scripting but while the language has cool concepts, some things are just broken by design).<p>Nevertheless, there is one piece in this puzzle I am missing. There does not seem to be a process which manages the 'core software set' across platforms. So after decades we finally have a shell which is available on most operating systems, but how long will it take before Microsoft, Apple, Oracle, etc. will adopt a new shell?<p>So why don't the large OS corporations form a consortium to define something like a 'cross platform run time environment' standard (maybe together with the Linux Foundation and some BSD guys?). I mean its not so much about which shell someone prefers, but more about a common set of interpreters and maybe tool kits. And even more than that it is not about the state but the process/progress.<p>What do you think, do we need such a process or is there another way to solve the cross platform dilemma?
The pain of "not quite bash" ultimately is what put me off xonsh as my daily shell. Also losing it whenever I SSH'd somewhere.<p>The latter problem could probably be solved with a wrapper which would pipe and execute the shell (or a bytecode interpreter ala shuttle?) automatically - but I've seen no alternative shell project take this part seriously for the problem space.
> Oil is taking shell seriously as a programming language, rather than treating it as a text-based UI that can be abused to write programs.<p>erm, there's a big difference between a command scripting language and a programming language. These should be treated as different things.<p>I have years of experience using both, and I really don't want to be doing shell tasks in a programming language and I don't want to write programs in a shell language. Those sorts of hybrids are almost always mediocre. Horses for courses and all that.<p>There's a reason bash keeps being used - it's mature, it's simple, it's easy and people are productive with it.
This keeps showing up on the front page. No doubt it will have users.<p>Lets say there are two uses of a shell: 1. interactive and 2. non-interactive (scripting).<p>Lets imagine the commandline user is learning about her OS. She learns it is heavily reliant on shell scripts to build and (if desired) to automate starting services.<p>She realises that to understand the OS she will have to learn the shell that the OS developers used for scripting.<p>Then she realises that if she chooses another shell for interactive use, she will have to learn <i>two</i> shells.<p>Finally she realises that any script she writes in the "non-interactive/scripting" shell <i>will also run under the interactive one</i>. But not vice versa.<p>If she only has enough time in life to master one shell, which one should she choose?<p>Over time I found I really cared more about the scripting aspect of a shell than the interactive facet.<p>The scripting shell used by the OS authors might be an Almquist derived shell, for instance.<p>Occasionally the ash Im using gets a new "feature" but not too often. I like that it stays relatively small. The latest "feature" is LINENO.<p>But I also use a smaller version of this shell with no command line history, no tabcomplete, etc. IMO, there is no better way to learn how to reduce keystrokes. It has led to some creativity in this regard for which I am thankful.<p>After "mastering" ash, I started using execlineb, pipeline and fdmove. I am starting to use more components of execline and am continually replacing ash scripts with execline scripts for more and more daily work.<p>I guess we will never see execline on the front page, which I think would be interesting because I would like to hear whatever harsh critique HN can muster.<p>Seeking a better <i>non-interactive/scripting</i> experience, I have experimented with many other shells over the years, and written simple execve "program launchers", but in this vein, I have not found anything that compares to execline.<p>The speed gains and resource conservation are obvious, but with the ability to do "Bernstein-chaining" and the <i>option</i> to use djb low-level functions instead of libc, it is a rare type of project.<p>The speed and cleanliness of the compilation process is, compared to all the other crud one routinely encounters in open source projects, "a thing of beauty". Humble opinion only, but I think others might agree.
Oil syntax looks pretty much like Tcl and Th[1] so the author could have probably just used Th. It has saner ways to copy arrays than<p><pre><code> b = [ @a ]
</code></pre>
which pretty much looks like Perl with added line noise. Why are the [] even necessary when it's clear @a is an array?<p>1. <a href="http://www.sqliteconcepts.org/THManual.pdf" rel="nofollow">http://www.sqliteconcepts.org/THManual.pdf</a>
As a fish user, I didn't really get where the advantages lie as clearly. I am for developing new shells, we really need this, innovation is important.<p>As for new language, I feel like if you want to script things, you can use ruby or python, hell, perl will do and you could be fine. I don't want to be unfair to this effort, I just feel that it is not for me and I am tinkerer.
Applaud the idea, but you are fighting a ton of inertia. I have to wonder if drawing a more clear line of when to go to Perl, Python, Lua, Ansible, Golang, etc, might be more fruitful. Sometimes, a shell script solution is just drawing any kind of shell too far outside it's core competency.
In your FAQ you decry Perl as having no ability to redirect around other programs. Yet you don't explain how any of the following fail to meet those needs.:<p>* <a href="http://perldoc.perl.org/functions/open.html" rel="nofollow">http://perldoc.perl.org/functions/open.html</a><p>* <a href="http://perldoc.perl.org/IPC/Open2.html" rel="nofollow">http://perldoc.perl.org/IPC/Open2.html</a><p>* <a href="http://perldoc.perl.org/IPC/Open3.html" rel="nofollow">http://perldoc.perl.org/IPC/Open3.html</a><p>* <a href="http://search.cpan.org/~odc/IPC-Open2-Simple-0.01/lib/IPC/Open2/Simple.pm" rel="nofollow">http://search.cpan.org/~odc/IPC-Open2-Simple-0.01/lib/IPC/Op...</a><p>* <a href="http://search.cpan.org/~exodist/Child-0.013/lib/Child.pm" rel="nofollow">http://search.cpan.org/~exodist/Child-0.013/lib/Child.pm</a><p>* <a href="http://search.cpan.org/~rkrimen/IPC-RunSession-Simple-0.002/lib/IPC/RunSession/Simple.pm" rel="nofollow">http://search.cpan.org/~rkrimen/IPC-RunSession-Simple-0.002/...</a><p>* <a href="http://search.cpan.org/~trski/Proc-Forkmap-0.025/lib/Proc/Forkmap.pm" rel="nofollow">http://search.cpan.org/~trski/Proc-Forkmap-0.025/lib/Proc/Fo...</a><p>* <a href="http://search.cpan.org/~toddr/IPC-Run-0.96/lib/IPC/Run.pm" rel="nofollow">http://search.cpan.org/~toddr/IPC-Run-0.96/lib/IPC/Run.pm</a><p>* <a href="http://search.cpan.org/~ayoung/IPC-Run3-Simple-0.011/lib/IPC/Run3/Simple.pm" rel="nofollow">http://search.cpan.org/~ayoung/IPC-Run3-Simple-0.011/lib/IPC...</a><p>* <a href="http://search.cpan.org/~rjbs/IPC-Run3-0.048/lib/IPC/Run3.pm" rel="nofollow">http://search.cpan.org/~rjbs/IPC-Run3-0.048/lib/IPC/Run3.pm</a><p>* <a href="http://search.cpan.org/~djerius/IPC-PrettyPipe-0.03/lib/IPC/PrettyPipe.pm" rel="nofollow">http://search.cpan.org/~djerius/IPC-PrettyPipe-0.03/lib/IPC/...</a><p>* <a href="http://search.cpan.org/~xan/IPC-Pipeline-1.0/lib/IPC/Pipeline.pm" rel="nofollow">http://search.cpan.org/~xan/IPC-Pipeline-1.0/lib/IPC/Pipelin...</a><p>* <a href="http://search.cpan.org/~sscaffidi/IPC-OpenAny-0.005/lib/IPC/OpenAny.pm" rel="nofollow">http://search.cpan.org/~sscaffidi/IPC-OpenAny-0.005/lib/IPC/...</a><p>* <a href="http://search.cpan.org/~glai/IPC-Exe-2.002001/lib/IPC/Exe.pm" rel="nofollow">http://search.cpan.org/~glai/IPC-Exe-2.002001/lib/IPC/Exe.pm</a><p>* <a href="http://search.cpan.org/~zefram/IPC-Filter-0.005/lib/IPC/Filter.pm" rel="nofollow">http://search.cpan.org/~zefram/IPC-Filter-0.005/lib/IPC/Filt...</a>
> Shouldn't we discourage people from writing shell scripts?<p>...people frequently ask this? Tip #21 of "The Pragmatic Programmer" states: "Use the Power of Command Shells."
What I would really like to see happening in Oil shell is a way to run a strict subset of the bash language. Ideally with a tool to convert existing scripts in that subset.
I use fish but I hate it. My perfect shell is strictly POSIX sh but has a better interactive experience (better tab completion and typeahead like fish has).
Seems an interesting idea, but it's implemented in Python, which means it will never replace bash and probably not achieve any significant adoption unless they rewrite it in Rust first (which they should have written it in to begin with since they started in 2016).<p>The reasons for that are that shells must start very quickly (due to subshells, local ssh, etc.), be fast, have no complex dependencies since they are used to recover broken systems, be portable but also with full support for OS semantics and be written in a language that allows rapid development of robust software, none of which Python does well.