4 ms·
I'd be cool to type something like `// spin up a lamp stack docker image`, and have below it the ghosted auto-completed command powered by chat gpt or something
by bottlepalm 4y ago
I'd be cool to type something like `// spin up a lamp stack docker image`, and have below it the ghosted auto-completed command powered by chat gpt or something.
I'd go so far as to say all command line apps should have an -explain suffix, that doesn't actually run the command it just parses it and outputs how it understands it in plain text. Combined with the above to help avoid AI mistakes.
- nonrandomstring 4y ago> should have an -explain suffix Adding -h or --help generally does something useful
- bottlepalm 4y agoThat gives you a list of all the commands, no something short and sweet about exactly what the command you have written will do. If --explain is part of the argument parser then it would be relatively easy to implement.
- nonrandomstring 4y agoSome programs kinda do that, but you're hitting on an old problem that Unix/Linux has a few ways of doing similar things all of which can miss the mark. commands info, man and apropos are fairly close to your goal, but: - info only covers bash/core-utils - not everything installs something into the apropos file (and many package managers seem awful at remembering to delete entries on uninstall) - man pages have many standards and good practices, but some are still terrible or nonexistent So a --help switch is the lowest common denominator. And has the advantage of living in the executable as an argument parsing outcome. But that means it suffers locale parochialism. I think people may be afraid adding yet another switch like --explain would only make things messier. So far I think the best is usually the first stanza of a well written man page.
- jimmaswell 4y agoI bet you could open a bash file with copilot enabled and do that right now.
- amalgamated_inc 4y agoCan't wait for AI to auto-guess that I meant to pass `-f /` to `rm`..
- dlivingston 4y agoI'm sorry, but that sounds awful. I turn to the terminal when I want precise and exact control over commands - the above seems highly fuzzy and error-prone.
- bottlepalm 4y agoThat's why I added --explain, so no matter what it is perfectly clear what the suggested command will do.
- deleted 4y ago[deleted]