3 ms·
To find out about man -- apropos manual and to find out about ls -- apropos "list directory" This doesn't change the fact that your average shell is not confi
by tresta 15y ago
To find out about man -- apropos manual
and to find out about ls -- apropos "list directory"
This doesn't change the fact that your average shell is not configured for beginners. There should be a banner offering a tutorial or something on first startup. Also, apropos should by default make a AND search instead of OR when given several arguments.
And maybe something like the friendly interactive shell should be made the default -- http://fishshell.com/ http://fishshell.com/
- seldo 15y agoYes, but how do I find out about "apropos"? I've been using Linux daily for 16 years now and this is -- really! -- the first time I've heard about this command.
- wccrawford 15y agoDitto that. I came to Linux from a DOS background, where I was pretty proficient. My first attempt went down in flames and I didn't come back for years. Now that I've learned it enough to consider myself 'good' (but not 'expert'), I prefer it. That took a LONG time. Longer than it took for DOS, actually.
- tresta 15y agoLike I said.. the shell should offer a tutorial by default on first login. And 'help' should probably be a built-in (like it is in fish!) that explains how to navigate the help files, and give a brief introduction to the shell. The non-obviousness of these commands is not an inherent flaw of the CLI, it's an implementation error.
- astine 15y agoEven better than a tutorial, have the shell pass any unrecognized commands to apropos or a help program. This would make things much more discoverable.
- lutorm 15y agoThis Altix machine I work on does this: @tg-login1:~> crap If 'crap' is not a typo you can run the following command to lookup the package that contains the binary: command-not-found crap -bash: crap: command not found`
- StavrosK 15y agoThe Ubuntu machine I work on does this: stavros@stavrosvise ~> crap fish: Unknown command “crap” No command 'crap' found, did you mean: Command 'cap' from package 'capistrano' (universe) Command 'czap' from package 'dvb-apps' (universe) Command 'crip' from package 'crip' (universe) Command 'grap' from package 'grap' (universe) crap: command not found
- Nick_C 15y ago> @seldo: how do I find out about "apropos"? > shell should offer a tutorial by default on first login. > 'help' should probably be a built-in FYI, OpenBSD has all these. I don't know why the various Linux distros don't.
- troels 15y agoI think that autocomplete, as is known from programming editors (IDE's) would work really well for discoverability in a text based shell. I don't know if anyone have tried to implement that?
- pbhjpbhj 15y agoYou mean shell completion? It's been done in varying forms quite a lot.
- troels 15y agoWell, yes, but I was thinking something a bit more verbose and p-front than just the old press-tab-to-autocomplete. Or did you have something else in mind?
- pbhjpbhj 15y agoI was thinking of this sort of thing, http://furius.ca/optcomplete/doc/sample-output.html http://furius.ca/optcomplete/doc/sample-output.html, but I've a feeling I've seen it done better than that somewhere but can't track where.