Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Choose default editor for PKGBUILD #7

Closed
hograthm opened this issue Feb 11, 2017 · 8 comments
Closed

Choose default editor for PKGBUILD #7

hograthm opened this issue Feb 11, 2017 · 8 comments
Milestone

Comments

@hograthm
Copy link

hograthm commented Feb 11, 2017

How can i choose my preferred editor? By default, yay opens PKGBUILD's in vi.

@hograthm
Copy link
Author

Ok, so i find the way to choose editor. yay just read the $EDITOR environment variable:
https://github.com/Jguer/yay/blob/master/aur/utils.go#L16-L20
And exec it with PKGBUILD here:
https://github.com/Jguer/yay/blob/master/aur/result.go#L114-L118

@hograthm
Copy link
Author

hograthm commented Feb 11, 2017

Can we implement yaourt's choose editor option? Thus, the user can enter the name of the preferred program and edit PKGBUILD. If no arguments given - run all the way it works now. This should not be difficult.

@Jguer
Copy link
Owner

Jguer commented Feb 11, 2017

I find that $EDITOR is the most straightforward and default way of changing the editor.

Is that an argument like --editor ?

@SolarAquarion
Copy link

that could work, it can also do a yayrc or whatever to set editor

@Jguer
Copy link
Owner

Jguer commented Feb 15, 2017

I'll add the --editor arg for now.
Was waiting to test Go's plugin system in 1.8 for the config and git updates so they become something completely optional (but I've seen reports of the plugin system doubling binary sizes).

@hograthm
Copy link
Author

@Jguer I mean something like this.
2017-02-17-122934_swaygrab

@Jguer
Copy link
Owner

Jguer commented Feb 17, 2017

If $EDITOR or $VISUAL is not defined show the warning and the "Edit PKGBUILD with:" prompt.

Will add

@hograthm
Copy link
Author

That would be great. Thank you!

@Jguer Jguer added this to the 1.100 milestone Feb 17, 2017
@Jguer Jguer closed this as completed in 14b46a7 Feb 18, 2017
Morganamilo pushed a commit that referenced this issue Nov 13, 2019
Reference our repo in readme and examples
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants