ThePrimeagen / uhh

When you keep forgetting those sweet sweet sweet sweet commands.
26 stars 6 forks source link

RFC: Add support for parametric commands #28

Open voldyman opened 4 years ago

voldyman commented 4 years ago

A parametric command is a command which requires some values from the user before they can be printed.

example: The user wants to download an mp3 from a youtube track (for educational purposes, of course)

they do the following:

$ uhh yt mp3
> Enter URL: https://youtu.be/dQw4w9WgXcQ
youtube-dl --extract-audio --audio-format mp3 https://youtu.be/dQw4w9WgXcQ

And to add parametric commands, they will use the invention from php, a '$' sign.

$ uhh add yt
Enter command: youtube-dl  --extract-audio --audio-format $(URL)
Enter search tags: mp3 audio
Added!
$

We could even provide some uhh specific params, maybe, later, maybe.

voldyman commented 4 years ago

@nicolai86 uses a similar workflow with alfred, which could be built on top of uhh since that will provide synchronization & sharing on top of what the alfred workflow provides today.