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

Add option to configure editor to use #1067

Closed
shahzebsiddiqui opened this issue Jun 2, 2022 · 0 comments · Fixed by #1070
Closed

Add option to configure editor to use #1067

shahzebsiddiqui opened this issue Jun 2, 2022 · 0 comments · Fixed by #1070
Assignees

Comments

@shahzebsiddiqui
Copy link
Member

Currently one can't configure the editor to use when using commands like buildtest config edit to edit configuration file or buildtest buildspec edit <test> or buildtest buildspec edit-file <buildspec>.

By default it will look at value of environment EDITOR if its set it will use it otherwise it will resort to vi. This can be problematic for users that may not have vi or perhaps they don't like their editor.

One option is to allow one to specify editor to use using one of the following method

  1. Environment Variable perhaps BUILDTEST_EDITOR?
  2. Configuration property perhaps editor in buildtest configuration which specify full path to editor for instance editor: /usr/bin/vim
  3. Another option is to specify editor on command line buildtest --editor /usr/bin/vim config edit

In this case the order of preference is following

  1. Command Line
  2. Environment Variable
  3. Configuration File

Let me know your thoughts @Xiangs18 @JeffreyFG and whether this would be good approach.

This will impact the following files

@shahzebsiddiqui shahzebsiddiqui self-assigned this Jun 6, 2022
@shahzebsiddiqui shahzebsiddiqui linked a pull request Jun 6, 2022 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant