pikaur
pikaur copied to clipboard
Feature Request: merge Edit and Diff prompts
This has been a small annoyance to me for a while, but it seems a bit excessive to prompt twice for each package being installed to both view a diff and to edit.
I propose that as an alternative (perhaps optional) to prompt the user with both at the same time, e.g.:
View a build diff (y) or edit (e) the PKGBUILD? [y/e/N]
and what if user wants to do both?
My thoughts are along the lines of what the pacdiff command currently does, in that it will continue to prompt the user until they choose to take no action. In this case, since there are only 2 options (besides no), I could see 3 possibilities:
- If the user chooses to view a diff, prompt them again if they would like to edit
- If the user chooses to edit, continue as normal afterwards since viewing a diff is not likely desired
- If the user chooses no, continue as normal
An alternative would be to leverage the DIFFPROG variable to do both jobs at once, since tools like vimdiff can handle that type of scenario.
I am not sure which of these options would be most suitable.
ok, your proposed workflow sounds well except for missing/undefined one detail:
currently "view diff' question have default answer Y or N depending if package with that diff was already built correctly before
so that means what depending on diff existence prompt would be altering between
View a build diff (y) or edit (e) the PKGBUILD? [Y/e/n]
and
View a build diff (y) or edit (e) the PKGBUILD? [y/e/N]
An alternative would be to leverage the DIFFPROG variable to do both jobs at once, since tools like vimdiff can handle that type of scenario.
that could go as a separate feature, with a new config option (empty by default), DiffAndEditTool (or so)
if it will be set prompt could be altered to View diff and edit PKGBUILD? [y/N]
/[Y/n]
Hmm I see what you mean. Personally the option of a diff and edit tool sounds most appealing, since it may be the least likely to confuse users. There may be a happy medium, though I'm not sure currently what that would be otherwise.