|
If you prefer the command-line and Unix shell, that’s one thing, but it’s no more “flexible or scriptable” than Emacs and Lisp. Dired can filter files with regexp; you can even fall back on GNU ‘find’ (‘find-dired’). And you can execute shell commands on filtered files in Dired (‘&’), it’s like xargs without the confusing syntax—but, of course, you can just run ‘xargs’ from it, if that’s what you prefer. A graphical file-manager is, I find, a much nicer interface for file-management than the command-line. I see all filtered files, and I can view and edit them anytime, as I please. With the command-line, it’s like I’m working with blindfolds on. Dired can be a nice refuge even if you’re a command-line junkie, because in-spite of its own commands (abstracting the shell), you can always drop back to the shell, as you please. Funnily enough, my usage of Dired vis-à-vis the shell is kind of the inverse of what you described, I use the shell for either quick or really complicated operations and Dired for everything else—which ends up being over 95% of my use. |
Preference is definitely a factor, I agree with you there. But while a programming language is obviously more flexible technically, most people don't want to write a program to perform a task on their computer.
My point is that the shell is easier to script than writing Lisp (for most people; I'm sure Lisp nerds would disagree), and is more flexible than whatever facilities dired provides out of the box. To be fair, I haven't used dired more than a few times even though Emacs is my primary editor, but even if it emulates xargs or allows you to drop down to shell commands directly, it will never be as flexible for file operations as just using the shell.
The shell is not just a file manager. That's one of its primary features, sure, but it allows you to operate on files in an infinite number of ways. This is because it exposes fairly simple primitives that allow you to combine programs in ways that even their authors hadn't anticipated. This is why the do-one-thing-well philosophy is so powerful.
The famous Knuth-McIlroy story illustrates this well. Knuth created a sophisticated program to count words, which McIlroy replicated in a one-line shell script using a few UNIX tools. Knuth's was probably more correct, better documented, and handled edge cases better, but McIlroy's obviously required far less effort and would be easier to understand and expand. I don't think any tech geek or programmer would prefer writing a program for such relatively simple tasks.