xnotify icon indicating copy to clipboard operation
xnotify copied to clipboard

Emulate xargs-style substitution token flag for commands

Open riotrah opened this issue 3 years ago • 1 comments

Hey there, wonderful work you've got here. Surprisingly difficult to find a cross-platform solution for this sort of thing, thanks for making one with OS built-ins <3.

Wondering if it makes sense to support a xargs -I {}-style flag for arbitrary placement of the changed filepaths for the commands. Additionally, perhaps, another flag could be used to define a "batch" substitution token like so:

$ xnotify <excludes, includes, etc> -I {} -BI % -- command-that-takes-single-file {} -- command-that-takes-all-changed-files %

I'm aware that one could simply use stdout and whatever they want with that, but was curious to know what your thoughts were about this, and whether it might be worth the implementation/maintenance effort for what is admittedly only a minor UX convenience (imo).

Anyways, thanks and take care!

riotrah avatar Sep 05 '22 19:09 riotrah

Hey riotrah, glad you found this useful. Am I understanding correctly that you're suggesting to add a replacement feature like xargs? IMO that doesn't align with the goal of the project, which is to provide an interface for file change events. This seems like it's better handled by other programs.

AgentCosmic avatar Sep 08 '22 14:09 AgentCosmic