curl cheat.sh/ffmpeg
curl cheat.sh/youtube-dl
curl cheat.sh/cd
curl cheat.sh/find
It gives quite a bit more than 3 use cases, but you could do: curl -s cheat.sh/ffmpeg | head
For more details you can go to the site in a browser or use: curl cheat.sh
curl cheat.sh/:help function cheat() {
curl cht.sh/$1
}So perhaps a suggestion could be to install tldr so as to be able to call a summary in your terminal without the need for web-access to cheat.sh
ffmpeg--resize-video video.mp4 50%
.bashrc:
ffmpeg--resize-video() {
ffmpeg ... "$1"
}
You'll have added benefit that ffmpeg--<TAB> will suggest you only your own UI, without interference from the tool's own options.This doesn't help when you want to map the fuzzy idea of performing a specific action to a particular existing program but it has helped me avoid having to search online for how to perform a particular task with ffmpeg.
[1] https://tldr.sh
However I think the tldrs need to be sorted better. When tldr git, the first example was
Check the Git version: git --version
Shouldn't the tldrs show me how to add, commit, push? Who knows.I think the tldr lists should be interactive and allow you to select by pressing 1-9.
And maybe it should re-sort based on what you use most often, hehe.
tldr git commit
will show examples and explanations for using `git commit`.I like the 3 top uses.
As for questions, maybe when I write:
ffmpeg gui
I'll get a gui menu where I can select all the options, and that will generate a textual command for me that I could use further.
The hard part of course is creating GUI's for all the console apps.
Can that be done mechanically?
PowerShell does this, but PowerShell is mostly despised by Linux users on forums.
When I enabled tab completion for git and google cloud CLI, my life became much better.
However, I still think there needs to be a "right click menu" for command line programs. Someone needs to determine the 3 most common uses and make it so that --help lets me choose one of them by pressing 1, 2, or 3.
Right now, --help usually gives me something that is difficult for me to understand, especially if I have never used that command before.
Tab completion works great if I have used the command before and want to save time.
Tab-completion could additionally list the "most common things given the context* I have".
Tab-completion needs not nessecarily be postfix. I've seen completion tooling** that would work somewhat like `invoice.pdf<tab> -> `open invoice.pdf\n cp invoice.pdf` etc.
And if `<tab>` conflicts, or breaks your mind because it must only work on postfix, it could be anything really, such as `<cmd>-r`.
Additionally, or underlying, a reasonable simple command like `whatcan` or `ctxt` (context) could work and be leveraged: `whatcan invoice.pdf` -> a list of common commands given the context* I have.
---
* Context I have would be your ~.\_history, the current directory-tree, permissions (why show `mv` if you don't have write access?), applications available, etc. pluggable maybe?
** e.g. the <ctrl>-r, interactive bash history search come to mind as pattern. But also tools like FZF https://github.com/junegunn/fzf#fuzzy-completion-for-bash-an... that don't nessecarily only "complete" on tab, but may replace larger parts of the commandline.*
Edit: formatting.
What if there was such a thing as a right click menu for command line programs?
Like if I type ffmpeg or youtube-dl with no args, it lists the 3 most common ways to use it, and maybe allows an interactive CLI menu where you can build up the correct argument list by answering a few questions.
I would love the most useful commands to look like:
Most realistically, I'd want the invocation without arguments to show an interactive menu of the top 3 uses, so I could just select what I want to do.Or if I provide a partial argument list, it should ask me to supply the rest of the args. Or maybe it should guess and do the right thing.
For example: