Bug 449192 - Feature request: code snippet library
Summary: Feature request: code snippet library
Status: RESOLVED INTENTIONAL
Alias: None
Product: konsole
Classification: Applications
Component: copy-paste (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-26 11:48 UTC by Vincenzo Buttazzo
Modified: 2024-03-24 01:28 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
attachment-14209-0.html (1.95 KB, text/html)
2022-01-26 15:43 UTC, tcanabrava
Details
attachment-24407-0.html (1.80 KB, text/html)
2022-01-27 10:41 UTC, tcanabrava
Details
attachment-22428-0.html (1.08 KB, text/html)
2022-01-27 19:16 UTC, tcanabrava
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vincenzo Buttazzo 2022-01-26 11:48:05 UTC
By managing my servers I have a library of code snippet to copy-paste into Konsole for various tasks.

Could such a library make sense as a Konsole feature? It would be great to just right click and choose a snippet to paste. Or maybe a side panel like the "SSH Manager" could be a good solution if bound to a keyboard shortcut to open it.
Comment 1 tcanabrava 2022-01-26 15:43:18 UTC
Created attachment 145962 [details]
attachment-14209-0.html

This is often requested but I don’t understand how’s that usable.
Why you don’t create bash functions tied to your bashrc and calls them?
What would be the benefits of having a panel on Konsole for that?


Le mer. 26 janv. 2022 à 11:48, Vincenzo Buttazzo <bugzilla_noreply@kde.org>
a écrit :

> https://bugs.kde.org/show_bug.cgi?id=449192
>
>             Bug ID: 449192
>            Summary: Feature request: code snippet library
>            Product: konsole
>            Version: unspecified
>           Platform: Other
>                 OS: Linux
>             Status: REPORTED
>           Severity: wishlist
>           Priority: NOR
>          Component: copy-paste
>           Assignee: konsole-devel@kde.org
>           Reporter: vbuttazzo@yahoo.com
>   Target Milestone: ---
>
> By managing my servers I have a library of code snippet to copy-paste into
> Konsole for various tasks.
>
> Could such a library make sense as a Konsole feature? It would be great to
> just
> right click and choose a snippet to paste. Or maybe a side panel like the
> "SSH
> Manager" could be a good solution if bound to a keyboard shortcut to open
> it.
>
> --
> You are receiving this mail because:
> You are the assignee for the bug.
Comment 2 Vincenzo Buttazzo 2022-01-27 09:41:00 UTC
> This is often requested but I don’t understand how’s that usable.
> Why you don’t create bash functions tied to your bashrc and calls them?
> What would be the benefits of having a panel on Konsole for that?

In my case it would be useful because I manage a number of servers and I don't want to add more scripts than needed for their normal work. But if I had to do some debug/check work there are some line I will run every time.

* Add some tools that are not already installed on minimal distros (vim, various net tools).
* Run some check routine
* Common queries I run on a database, again for debug. 

Sure, all things you can do in many ways already. Just a nice feature to have.

I suppose it would be a nice extension, but I didn't found how to write one.
Comment 3 tcanabrava 2022-01-27 10:41:07 UTC
Created attachment 145981 [details]
attachment-24407-0.html

If you’re a developer I can help you get started.
Take a look on the source code for the ssh plugin, and let’s start from
there.


Le jeu. 27 janv. 2022 à 09:41, Vincenzo Buttazzo <bugzilla_noreply@kde.org>
a écrit :

> https://bugs.kde.org/show_bug.cgi?id=449192
>
> --- Comment #2 from Vincenzo Buttazzo <vbuttazzo@yahoo.com> ---
> > This is often requested but I don’t understand how’s that usable.
> > Why you don’t create bash functions tied to your bashrc and calls them?
> > What would be the benefits of having a panel on Konsole for that?
>
> In my case it would be useful because I manage a number of servers and I
> don't
> want to add more scripts than needed for their normal work. But if I had
> to do
> some debug/check work there are some line I will run every time.
>
> * Add some tools that are not already installed on minimal distros (vim,
> various net tools).
> * Run some check routine
> * Common queries I run on a database, again for debug.
>
> Sure, all things you can do in many ways already. Just a nice feature to
> have.
>
> I suppose it would be a nice extension, but I didn't found how to write
> one.
>
> --
> You are receiving this mail because:
> You are the assignee for the bug.
Comment 4 Vincenzo Buttazzo 2022-01-27 10:59:34 UTC
I feared such an answer... OK, challenge accepted 👍

In case of need should I ask for help here or is there a better place?
Comment 5 tcanabrava 2022-01-27 19:16:14 UTC
Created attachment 146000 [details]
attachment-22428-0.html

We have a mailing list and a telegram channel,
https://t.me/+gOW6P8R5cToxMGIx


Le jeu. 27 janv. 2022 à 10:59, Vincenzo Buttazzo <bugzilla_noreply@kde.org>
a écrit :

> https://bugs.kde.org/show_bug.cgi?id=449192
>
> --- Comment #4 from Vincenzo Buttazzo <vincenzo@buttazzo.eu> ---
> I feared such an answer... OK, challenge accepted 👍
>
> In case of need should I ask for help here or is there a better place?
>
> --
> You are receiving this mail because:
> You are the assignee for the bug.
Comment 6 Nate Graham 2022-01-27 21:30:02 UTC
I agree that bash functions would make more sense. Most people tend to do this.

For arbitrary text you might want to paste, I think it would make more sense for the to be integrated into the systemwide clipboard, e.g. with https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1265.