Open ducalex opened 2 years ago
I prefer the yes
default myself but if it can become a configurable item it would make sense.
@ducalex: Yes, it has to bubble through quite a lot of code. Adding it makes sense to me as well.
@ducalex: Yes, it has to bubble through quite a lot of code. Adding it makes sense to me as well.
Thank you, I'll spend some time studying the code and prepare a draft with hopefully minimal and non disruptive changes!
On a related note, would it make sense to pass a UIConfig object (or similar appropriate construct) to CreateUI instead of a list of args? Because there are other feature requests to add flags/settings (#12/#123, #103) and I suspect it would involve updating ~70 CreateUI calls (which admittedly is mostly tests) for every addition? If so, maybe it should be done prior to my current feature request?
Yes, passing the options as config object makes sense to me. We can make separate PR for it. Would you like to do it?
I'm fairly new at Go so I don't feel confident enough to architect this change myself at the moment. But maybe someone will be able to give me some guidance after seeing the extent of code that had to be changed by my initial PR.
I wish I could specify a custom function/script for deletion... so I could script to tarball then delete. ;D
In gdu the default button in the delete dialog is "Yes" but in ncdu it is "No". This isn't a big deal but muscle memory can be hard to adapt! I would like to add an option to change the default in gdu to match the behaviour of ncdu.
Is this feature something the gdu project would accept to merge, and if so what do you think would be the best way to do it? Flag? Env? Other?
Thanks!
PS: I did implement this feature for myself, but it's not elegant (added --default-delete-action=yes|no but it required changing CreateUI signature to pass the flag which of course ends up changing way too much stuff... There's probably a better way😃).