Textualize / trogon

Easily turn your Click CLI into a powerful terminal application
MIT License
2.45k stars 56 forks source link

feature request: ability copy the running command #12

Open derlin opened 1 year ago

derlin commented 1 year ago

As stated in the readme, trogon is made for discoverability, but after trying out the command, we want to actually add it to our history and use it directly. This feature request is thus about adding a shortcut to copy the command to the clipboard.

simonw commented 1 year ago

I wonder if it would be possible to add it to the bash history?

I ran sqlite-utils tui and then built a complex command, but when I hit Up on my keyboard it gave me the sqlite-utils tui command again when I wanted to see the command it had built for me.

daneah commented 1 week ago

I looked into Python-driven additions to shell history for a Typer-based CLI I've built (which uses Trogon for command discoverability) and ultimately found that there doesn't appear to be a POSIX-like standard way of adding commands to shell history across all the different shell types, which I imagine to be the reason this doesn't already have a tidy solution readily available. To highlight just a few: