pikaur icon indicating copy to clipboard operation
pikaur copied to clipboard

Feature Request: merge Edit and Diff prompts

Open CubeTheThird opened this issue 5 years ago • 5 comments

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]

CubeTheThird avatar May 08 '19 03:05 CubeTheThird

and what if user wants to do both?

actionless avatar May 08 '19 23:05 actionless

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:

  1. If the user chooses to view a diff, prompt them again if they would like to edit
  2. If the user chooses to edit, continue as normal afterwards since viewing a diff is not likely desired
  3. 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.

CubeTheThird avatar May 09 '19 01:05 CubeTheThird

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]

actionless avatar May 09 '19 03:05 actionless

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]

actionless avatar May 09 '19 03:05 actionless

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.

CubeTheThird avatar May 13 '19 03:05 CubeTheThird