Fish sucks (but your shell sucks more)
markhansen.co.nz
markhansen.co.nz
I'm getting so tired of the overuse of this principle. Look, I don't care what options are available (really...) when I'm dealing with a word processor, or a spreadsheet program, or whatever. I expect people who don't use a computer so much might say the same thing about their web browser or email client.
But a shell (and a text editor, and a window manager) is an extremely general tool by necessity, and I have a very specific way in which I use it to get things done. If a highly configurable terminal can make that marginally easier, over time it's worth it.
I don't disagree that many/most programs could do with fewer options and more informed choices on the part of the developer, but there's nothing inherently wrong with putting well-considered options into your program.
I love simple, discoverable interfaces as much as the next guy, but let us not stray too far from "fast" and "powerful" in search of "pretty" and "simple", where it counts.
This is completely backwards. If setting up a good shell saves you several seconds per command, then you're saving minutes every day, and several hours a month. I probably spent 30 minutes configuring zsh initially, and I occasionally spend a minute here and there tweaking small things (or not, if it looks like it will be too much trouble), but the payoff is worth it in the end.
The moral of the story is try things, it really isn't as hard (or time consuming) as you think. If it is, then give up and do something else (or try later).
"Configurability is the root of all evil" because if you can change everything, you'll eventually change it into the same stagnant workflow you've had all along.
Take for example his mentioning of lack of 'man'. man has been with us since 1971. Lynx came 20 years later in 1992. There's no information that man encapsulates that couldn't be represented in hypertext - so why haven't the majority of shells moved away from man already?
Sometimes that crutch of configuration can hobble you worse than it'll support you.
A shell can't "move away" from man. It could ship with its documentation in a different format, or the authors could even develop a new documentation reader... but if you think man and the shell should somehow be specially related, you're forgetting how Unix works.
But unfortunately I had to abandon fish after a solid month of using it exclusively. Active development seems to have ceased on it. There are a lot of bugs in the code, at least a couple of which make the shell almost completely unusable for me (for example, running fish from screen is problematic). The mailing lists have some activity, but nothing much from developers. At this point it seems like an abandoned project. As an example of the lack of oversight, the main project web site's domain registration lapsed earlier in the year and it is only back thanks to a good Samaritan.
So I switched to zsh. And it has been pretty great. The configuration files are daunting, but it can do pretty much everything that fish can (and a whole lot more), it is under active development, and is backward-compatible with bash.
[1] http://vimeo.com/6782671 (it's about babushka, but he uses fish as the shell)
I really like iPython's psh - unfortunately it's not well known, since it's not advertised properly (they concentrate on the python's repl part a lot). It does work quite well though: http://ipython.scipy.org/doc/manual/html/interactive/shell.h...
for f ({foo,bar}/*(.)) { cp -v $f ${f%.js}.min.js } > output.txtS-Expressions should allow you to do anything a shell can do, and with good completion (it'd have to be at least as good as Zsh's) I could see it being usable. Somebody just needs to do it right.
It solves most of the complaints in TFA; the only downside is poor documentation and poor performance for IO-heavy operations.
The other big issue is having to build up commands to execute through String concatenation, which feels just as awkward and inelegant as building up SQL commands through String concatenation. Maybe you could do some funky namespace stuff where programs on your path are imported as functions?
grep("foo", "bar.txt")
(Note we still have the superfluous quotation marks. How to get rid of those?)In short, a shell is a DSL for executing programs, redirecting IO, and exploring a file system. It is hard to tweak a general purpose programming language to the point where it is better at those tasks than a shell.
I imagine some of the programming language specific shells mentioned in the article have found ways of solving these problems, and I would be interested in hearing what those solutions are.
Eshell does a great job at this; it feels like a shell, but it also feels like invoking lisp functions. Obviously you're not typing direct function invocations otherwise you would have to quote all your strings, etc; but it's pretty close. You can pipe output from processes straight into Emacs buffers or even into functions. All the shell commands that have nicer Emacs equivalents (grep, top, man, etc) get intercepted so you get the enhanced hyperlinks in grep results, etc. I find it absolutely indispensible.
http://www.masteringemacs.org/articles/2010/12/13/complete-g...
Edit: Ah, I guess it is Domain-specific language.
Currently an Ubuntu system depends on bash, ash, perl and python scripts for various tasks - booting up, init, etc.
Take one scripting language and use that completely. Not an easy task, since you will have to do stuff like have a perfectly compatible PCRE library, etc.
Maybe if you're a *nix system administrator. Otherwise, no, not really. I spend most of my time in Eclipse. People who prefer using editors to an IDE spend most of their time in Emacs or Vi(m). But shell? Maybe to hack together a script now and then, but certainly not most of the time.
That implies that the standard development environment used to not be integrated. And that's exactly what Unix is: a development environment where the tools are not integrated into one place. That sounds like a bad thing on the face of it, but I do not think it is. I think it allows for more flexibility.
I think IDEA is a fantastic IDE, and possibly there are shortcuts to do what I'm doing in a shell, but even screen redraws etc take up needless time and force me to wait when I don't need to with smart use of a shell.
I'm an old school vim/perl hacker though, so maybe I just am used to working a particular way, having "grown up" with the shell, I can't imagine not using it to do most of my work for me.
Speak for yourself. I also don't care a lot about "intellisense" in editors. That's why I'm not too entranced by the advanced tab completion features that a lot of shells (bash, zsh, fish) offer. Most of the time I'm better off just typing, using the history (!!, ^) or writing small aliases, scripts or functions. And in that regard, all those "modern" shells still have a lot to learn from ksh93 (or even ksh88).
If I want advanced editor features in a shell, I can always use an advanced editor (i.e. use eshell).
The main draw of the "modern" shells is their completion, particularly history related completion. The function I use for it is just one of god-knows how many, and they can be customized to the extreme. If all you want is advanced editing features, just about every shell under the sun supports vi-mode (my preference) or firing up an editor with the contents of the current line in it's buffer. Just advanced editing isn't really the main attraction.
Zsh/bash/fish don't try to innovate in that area. The readline library (which is the basis for most of the interactive history features) is quite nice, but I'd much rather save me some repetition than make sure that the repetitive commands can be entered fast enough.
I guess it all comes down to how repetitive your shell usage is. If you're very exploratory, i.e. use different paths, systems and command line options all the time, completion helps, just like it helps you navigate a huge mess of a class inheritance tree. If you find yourself able to factor out common tasks, scripting is a bit more helpful. And most of the time, I fall into the second camp, which is why I've never found fish all that attractive. Which is what I wanted to point out (although a bit too bluntly – curse my German nature!).
I'm not saying that this is a significant amount of work, but the author's complaint that other shells don't do per-app completion out of the box is valid. However, there are good reasons for keeping such completion code separate from the shell itself.
No, I don't think it's new at all. From Ian McDonald's site, Working more productively with bash 2.x/3.x[1]:
> A relatively new feature in bash is programmable completion, which has been available since the beta version of 2.04.
Taking a quick look at Bash's official downloads site[2], Bash 2.04 was released in March of 2000.
On the other hand I'm slowly migrating to ipython shell as the main login shell. Since every other terminal I open runs ipython, that makes sense. It also lets me script a lot of stuff without the crazy *sh syntax.
You can download it from Sourceforge: http://sourceforge.net/projects/fish/
Huh?