[GH-ISSUE #152] [Enhancement REQ] Click on snippet with ALT (or CMD etc.) = run shell command or script before pasting #81

Open
opened 2026-03-03 01:09:57 +03:00 by kerem · 2 comments
Owner

Originally created by @JayBrown on GitHub (Feb 17, 2017).
Original GitHub issue: https://github.com/Clipy/Clipy/issues/152

I often have to post default text snippets, but the contents vary, e.g. the date. Therefore it would be great to have a functionality to run shell commands or even shell scripts beforehand, e.g. $(date).

A snippet with commands/scripts could then look e.g. like this

This article was last cleaned at {{ $(date -u) }} by {{ $(id -un) }}. Reason: {{ $(db-last-error.sh) }}

Don't know if it's hard to add a bash thingy to Clipy; for user interaction, at least, it would be necessary to define the surrounding characters, so Clipy will know that a command or script will start, in this case {{ }}

Originally created by @JayBrown on GitHub (Feb 17, 2017). Original GitHub issue: https://github.com/Clipy/Clipy/issues/152 I often have to post default text snippets, but the contents vary, e.g. the date. Therefore it would be great to have a functionality to run shell commands or even shell scripts beforehand, e.g. $(date). A snippet with commands/scripts could then look e.g. like this ``` This article was last cleaned at {{ $(date -u) }} by {{ $(id -un) }}. Reason: {{ $(db-last-error.sh) }} ``` Don't know if it's hard to add a bash thingy to Clipy; for user interaction, at least, it would be necessary to define the surrounding characters, so Clipy will know that a command or script will start, in this case {{ }}
Author
Owner

@Econa77 commented on GitHub (Mar 7, 2017):

@JayBrown Sorry for my late reply. The function to embed dates etc in the snippet is planned to be implemented.
Please wait a little more until implementation 😄

Related: #90

<!-- gh-comment-id:284616685 --> @Econa77 commented on GitHub (Mar 7, 2017): @JayBrown Sorry for my late reply. The function to embed dates etc in the snippet is planned to be implemented. Please wait a little more until implementation 😄 Related: #90
Author
Owner

@bjohas commented on GitHub (Nov 27, 2018):

I would love to see this feature too (similar to the clipmenu functionality)!

<!-- gh-comment-id:442203348 --> @bjohas commented on GitHub (Nov 27, 2018): I would love to see this feature too (similar to the clipmenu functionality)!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Clipy#81
No description provided.