alexpasmantier / television

The revolution will (not) be televised
https://crates.io/crates/television
MIT License
116 stars 3 forks source link

Feature Request: Configuration of commands to run on selection #16

Open koopa1338 opened 2 days ago

koopa1338 commented 2 days ago

Problem Currently you have to pipe the output to the command you want to handle (cd, xdg-open, etc.)

Feature To prevent adding aliases for everything, it would be nice if it where possible to configure commands that handle the selection and to group them by channel. For example the cd command doesn't make sense in the files channel. A popup that lists all configured options with a fuzzy search would be amazing.

The configuration I had in mind would look something like this:

[channels.file]
run_options = [ "xdg-open", "file", "rm" ]

[channels.git_repos]
run_options = [ "cd", "rm -r", "./local/bin/copy_commit_hash.sh" ]
alexpasmantier commented 8 hours ago

That is indeed an interesting idea I plan to come back to ASAP. Thanks for sharing 🙏🏻