the main problem with the UNIX Philosophy Of Having Lots Of Little Tools That Each Do One Thing is: you can never remember the name of each one, or how it works
for a while i've been thinking about writing something where you'd have like, a console window, and you hit a button, and it brings up a big (autocomplete/searchable/hierarchical) list of all the tools (and custom scripts you've written), and when you choose one, you're given a kinda interface describing the parameters the command takes, with input fields for each argument, where you can type in the value you want (or pick it from a list or something)
@jk have you tried "man"?
@jk I don't like to scroll through a book either... But having to press "next" multiple times is not funny either...
@jk You mean something like Microsoft does with writing code, where it automatically predicts your next command?
maybe i'd come up with some kinda annotation for scripts that would allow them to function with this system, like a machine-readable manpage or --help function?
^^ the thing is with this whole idea, and maybe something that's readily misunderstood by computer-programmer-type-people, is that it's not about "Creating A New Paradigm", "Devising An Elegant System", etc.
it's about taking things we already have and improving and refining them based on how users actually use them. going back to things we rejected in the past and retrying. working hard & iterating on an existing design to make many small improvements - something that nobody ever wants to do!
@jk thank you for saying this, that's a thing about computer programmer type people that I've lost patience with (as a lapsed (okay, failed) programmer person myself)
@Efi yeah i just want something in addition to the terminal input for when the terminal input is not enough! i don't want the most powerful thing in the world, i want the thing that's the most useful to me, because i never end up USING any of the features of the most 'powerful' or elegant systems
@Efi generally the more powerful any kind of interface to a computer is, the more you have to do upfront inside your brain in order to use it. i'm personally not that interested in power and elegance for its own sake, i want the computer to be transparent to me, and help me as much as possible, because i am dumb!!!
@Efi the terminal looks nice to me, it's unadorned and functional, works well for keyboard-only input, and using it is pretty much the only way to do many Mid-Sized Computing Tasks (like: more than you can get done using 'windows explorer' or 'notepad', but smaller and more informal than writing your own script or piece of software)
@jk that is a big problem to solve, because as you increase the complexity of a tool, the complexity of its explanation grows exponentially
look at sed, it's a very simple tool, it takes a <text thing> and returns a <text thing> modified with a regex pattern substitution
it is unscrutably complex in what it -can- do
@jk i've wanted a standard machine-readable interface description for CLI stuff for ages.
i think people have done interesting things with parsing manpages (explainshell?), but it all feels a bit ad hoc.
anyway: when i think about early text interface models that worked well, it seems like a lot of people have forgotten how much we used to rely on menu systems, and how generally useful they actually are because human memory is pretty crappy.
@jk one thing i've been fiddling with is this idea where cumulative shell history would be used to build up a per-directory menu of past commands and oneliners.
in practice there's a bit too much noise in "commands i have run in ~/code/foo" to just make for an immediately useful menu system, but i think combined with annotation / tagging of history, there's something there.
@jk i wrote https://github.com/brennen/commandlog as a start on this, and have been experimenting with RASH - https://p1k3.com/2017/1/24/ - which is featureful but also kind of buggy.
also sorta interesting as a piece of plumbing is https://github.com/junegunn/fzf
@jk @brennen
It might be possible to produce theme tagging for commands with something like word2vec: creating a base model based on all the man pages in man3, then creating models for each individual one, determining command similarity via semantic distance, and then using another language model based on all documentation to expand the set of tags.
That way you can build a thematic search into the shell the same way you have a history & path search.
@jk Sounds a bit like Quicksilver for the Mac, back in the day.
@sanspoint yeah, those kinds of systems were probably going in the right direction (i think quicksilver still exists, there's a few others now)
@jk It does, but I'm all in on LaunchBar. I prefer how it handles iTunes libraries.
@sanspoint when i was using OS X more i used Alfred, which was nice given that you could set up custom stuff quite easily! although all I really used it for in the end is to launch apps and occasionally "kill all running apps" when the desktop is looking too stressful
@Efi @jk * #Xenofeminism voice* If The Command Line Is Unjust, Change The Command Line.
@jk I seem to recall a script like this, but can't remember the name (ironic, no?).
A related one is thefuck, which fixes typos in commands and arguments: https://github.com/nvbn/thefuck
@jk PowerShell has this kind of thing! Although I don't think it's extended to the bash native commands if you're using the Linux port (it doesn't help with old Windows command line switches). https://scalie.club/media/EM5Sjs2vdmD6NEm4O5g
@jk Have you tried fish shell? It's not precisely what you describe but it does some of those things.
@jk isn't fish kind of like that? https://fishshell.com/
@theoutrider fish is a lot like this idea, except adapted to a regular shell interface so that it seems a bit more 'normal' to people, and with less discoverability etc
@jk
Lies.
I know how to use man.
You speak falsehoods as to our abilities, hyperbole coyote.
@jk
man -k
or if we're really confused, man --global-apropos
If you look at man man, you'll see that the -k options is equivilant to apropos.
man apropos will reveal that the command searches through the short description of system commands for keywords and displays the results on the standard output.
--global-apropos allows that search to extend to the full text.
@jk
If you're lucky enough to have a graphical session and the ability to install software, Gman provides a pretty user friendly GUI tool for looking through man pages.
@jk anytime I can't remember what a command does, I just visit https://git-man-page-generator.lokaltog.net/
@jk or the flags, my god, the flags
One would think a CLI cheat tool would exist for that -- not documentation for each tool, but a directory of common tools, searchable by accessible-language explanations of intended function and common-but-unintended applications of them.
@jk The one to output a file's content to the standard output is dog, right?