Yay: Option to always edit PKGBUILD

Created on 9 Mar 2018  路  13Comments  路  Source: Jguer/yay

With this option provided, it wouldn't ask to edit, but open it in the editor. It should have an opposite option, that never asks, but skips editing. (e.g. --edit, --noedit).

Enhancement

Most helpful comment

You should be able to do yay --answeredit all --save to always edit pkgbuilds. yay --noansweredit --save to remove the answer. Mentioning it here because there's no documentation right now.

All 13 comments

Number menus for editing should be coming soonish and will reduce the amount of keys you need to press. I'll wait for that feature to be added and see if you think this is still needed.

The install process has changed to be less spammy with questions. I don't really see these flags being needed with how low hassle it should be to just hit enter once. Try it and tell me if you'd still want these flags.

The new install process is very cool, however I would like to skip the second (PKGBUILD editing) prompt with this flag (automatically answer All).

Alright I'll see about passing a flag that answers for you.

What about predefining the answer with the command line option? This would allow to choose many answers.
E.g. --editanswer All, or --editanswer NotInstalled

That's what I was thinking of. Wasn't sure whether to make it actually choose for you or set the default then you just hit enter. But hitting enter for you would probably be what most people want.

I think both could be choosed. If the command line flag contains a newline: "NotInstalled\n", it should be automatically accepted, if not, it should be only set to default.

IMHO still making the user still hit enter is pretty silly, the point of me setting a flag with default answer beforehand is to skip the question/automatize/minimize input. All the answers should be chosen for me given the command line flag preset.

I guess that how it should be. I for sure didn't want to attach "\n" to the end because that's tedious. Just having it hit enter for you is probably the best way to do it. A new flag can always be added to toggle the enter hitting alongside the default answer if people want it.

Oh wow, wait, you intend on implementing this the gnu-utils's yes way, instead of actually adapting the decision flow to be aware of the cmd-line flag and not ask for input?

No I intend to make it read the flag if set rather than stdin. This allows options all abort installed to be passed just like how the user can enter manually. As a side effect this would allow users to enter numbers. I might explicitly disallow this but I do not know right now.

The mention of "\n" comes from https://github.com/Jguer/yay/issues/226#issuecomment-372474176

It'd ideal, if this option will appear in configuration file.

You should be able to do yay --answeredit all --save to always edit pkgbuilds. yay --noansweredit --save to remove the answer. Mentioning it here because there's no documentation right now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

makeworld-the-better-one picture makeworld-the-better-one  路  3Comments

torvic9 picture torvic9  路  4Comments

Zeioth picture Zeioth  路  3Comments

ricochet1k picture ricochet1k  路  4Comments

GermanG picture GermanG  路  4Comments