Comments (7)
I'm willing to work on this.
from hoard.
Sounds good! I'll work on this in the coming days. Progress might be a bit slow as I'm very busy.
from hoard.
I'd love to get some more specification: Where do you want me to copy to the clipboard? In which subcommands?
from hoard.
Excited that you're interested in this issue!
I think this first needs some research on how to approach this properly.
The goal would be threefold:
- The subcommand pick sends the string for the found command to the clipboard of the used operating system instead of just printing it to the console.
For the next two, its good to know that hoard
can be installed as a shell plugin, which runs hoard list
when called.
When running as a shell plugin, and selecting a command ( With the enter key ) in the GUI, your shell prompt will automatically be filled with the selected command. However, I have not found a way yet to replicate this functionality when the program is not ran as a shell plugin.
Thus:
- When running
hoard list
as a shell plugin, copy a command into the clipboard by a (new) shortcut like<CTRL>y
. See here for exemplary key handler events. - When running
hoard list
not as a shell plugin, support the previous way to send a command to the clipboard, but also when pressing enter do the same
The logic for the last two of actually sending a string to the clipboard can be handled after the hoard list
subprocess is finished here.
Feel free to refactor this into a sperate file handling clipboard stuff
A final point on the clipboard support. hoard
is expected to run on linux and mac. So, the clipboard handler should be capable to handle x11, wayland and whowever mac is doing it. This crate seems to lead the right way.
Also, this means the way of installing hoard
has to be reconsidered, as a system level library will be a dependency. Either that, or we programatically check if the right libraries are installed and only support this feature if they are present.
Any thoughts on this? I'm open for any suggestion if you have some!
from hoard.
I think that looks good.
So, in short:
- Support
^y
to copy a command to the clipboard inhoard list
- Also copy a command to the clipboard automatically if enter is pressed while we're not in shell-plugin mode.
hoard pick
still prints to the console but also copies to the clipboard.
from hoard.
Sounds good!
Ill then take care to update the installers making sure the necessary dependencies are met for however you will will implement the clipboards
from hoard.
Absolutely no worries, take the time you need for it !
Glad you're interested in contributing
from hoard.
Related Issues (20)
- Allow escape character HOT 2
- GUI command edit HOT 1
- GUI new command from history HOT 3
- Ubuntu .deb packages missing from releases HOT 3
- install.sh write BASH config to .zshrc not .bashrc HOT 3
- Customize tab highlight color HOT 1
- Select name space for new command HOT 1
- Named parameters using `hoard pick` are not interpreted as expected HOT 3
- Allow api_url to be configured that gets used in chatgpt_rs HOT 1
- CVE-2023-26964 question HOT 13
- Unused import/function in the recent release HOT 3
- Problem installling Hoard HOT 3
- New releases not being published, causing installation errors. HOT 1
- Typo in the latest tag HOT 1
- Improve Input Parameter Prompt Clarity and User-Friendliness HOT 2
- Homebrew download failure (most v1.4.2 url paths contain a typo) HOT 1
- Improve descriptions with Markdown or other lightweight formatting options HOT 1
- The version check conflicts with `shell-config` HOT 4
- CVE-2024-32650 HOT 1
- Better editing commands: cursor and navigation HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hoard.