pet
pet copied to clipboard
Print Command Snippet For other Uses
Feature Request
This is a wonderful tool, But it works only in local system terminal. It would be great to print or copy a snippet in the clipboard to use with other programs.
We all use SSH and save our snippet locally, But when it comes to run that on the server, I have to go to pet edit
and manually copy that command.
A sample tool for this functionality is https://www.renfei.org/snippets-lab/
Regards, Rahul Sharma
I would really like something like this as well. It seems like there could be another subcommand, something like "pet print" where it lets you search your snippets and if you make a selection it just echos the output to the shell where you can then copy it or modify it and run it.
pet search does that - it prints the selected command without executing it
Sure, pet search
do it, as resquested.
However, my workflow is :
- type
pet search
- copy with the mouse the result
- paste the command
It will be great if pet search
can have an option to copy directly in the clipboard. Or another command likes pet clip
I use this work around on MS Windows
@echo off
if "%1" == "clip" (
c:\pet\pet.exe search|sfk toclip -nolines
) else (
c:\pet\pet.exe %1
)
Edit: sfk toclip only exist for windows, on linux you can use xclip
Supported!