3 ms·
I'm not sure of all the history, but it feels to me like there were two cute ideas of the classic shell metaphor that we never quite achieved, and anyway we've
by nfoz 5y ago
I'm not sure of all the history, but it feels to me like there were two cute ideas of the classic shell metaphor that we never quite achieved, and anyway we've totally outgrown:
1. That the shell's user is "in" a location of the filesystem (cwd), and can move around it like you're an avatar navigating rooms.
2. That the shell can "only" do program invocation, such that even its basic primitives like 'cd' and '[' can be just themselves programs.
It's heretical, but, I don't think ls ought to be its own program. It's part of the shell, in particular part of my view of the filesystem. It's not really an app and I don't care if it happens to be implemented that way under the hood.
As a user, I want a shell that lets me navigate the system (possibly multiple sets of systems), with a consistent set of primitives. It can let me invoke applications, and I want an absolute and extremely tight set of controls over those applications, and very specific ways that they're allowed to talk to each other.
I'm running far off-topic but to your original point, I think "ls" isn't really the type of app we ought to be talking about here, just bake it into the shell...... ok I just want to abandon posix and work in new metaphors. That really is off-topic for discussions about a new Linux feature I guess.
- chungy 5y ago> 2. That the shell can "only" do program invocation, such that even its basic primitives like 'cd' and '[' can be just themselves programs. "cd" is one of a few commands that basically must be built-ins no matter what, since it has to modify the environment of the shell itself. Any external command can only modify its own environment, not the shell's environment.
- zerocrates 5y agoJust have cd spawn you a new shell that's in a new working directory, solved! Call it the immutable shell.
- HideousKojima 5y agoHave it contain a hash of the previous shell and cryptographically verify its authenticity with all of the electricity in Argentina and you can even get the crypto guys to promote it for you for free!
- OJFord 5y agoHa, great idea. Unfortunately for you I just minted a non-fungible token that describes my claim to its representation in digital form, I own that idea. (Of course you might want to mint a different NFT using a slightly different way of digitally representing it, but let's not worry about that. Mine.)
- ahefner 5y agoNow I'm imagining an analogy to continuation passing style: exec (tail call) 'cd', tell it to exec /bin/sh (the continuation) in the modified environment.