Comments (3)
I think the main challenge with deletion in the fzf interface is handling confirmations well, so that users get a confirmation prompt before permanently deleting a history entry. Though looking at the fzf docs I think that the execute action may be able to handle confirmation.
In that case, the elements would be
- Find/make a CLI one-liner that can delete a history entry with command-line confirmation (e.g. y/n prompt). This would likely require writing a little rust code and adding a new subcommand to mcfly-fzf, and reading the mcfly code to find what function to call to perform a deletion
- Add a key-binding to the fzf setup scripts that will call that command appropriately
For prototyping, I'd recommend you start with 2 and make a dummy python script or something to make sure that the UI of prompt + confirm will work well, and ensure that you are able to get the relevant information passed to the CLI script.
Definitely something I'd be happy to take a pull request on if you can get it working
from mcfly-fzf.
FWIW I don't like McFly's confirmation in the first place. What do you think of skipping the confirmation in a first iteration, disabling the shortcut by default and adding an environment variable flag, e.g. MCFLY_FZF_UNSAFE_DELETE=1
? Then we could see to eventually add the confirmation and make it activated by default.
from mcfly-fzf.
Yeah, disabled by default but no confirmation sounds good to me. I'll take a look at your pull over the next few days as I have time. I'm also a bit of a rust noob, but I've found tinkering on projects like mcfly and reedline to be a good learning experience
from mcfly-fzf.
Related Issues (6)
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 mcfly-fzf.