Allow editing multiline prompts with external text editor #429

Merged
lunny merged 5 commits from noerw/tea:preferences-editor into master 2021-10-14 14:36:09 +00:00
Member
  • Adds a new Preferences struct to the config, initially only containing Editor: bool (default false).
    This struct will be serialized to configs once there is a first tea induced change to the config (eg tea login default <name> or tea login add).
  • Use external editor for all multiline prompts if preferred.

We already had a function for starting a texteditor for diff reviews; it does not really make sense to replace it with survey.Editor, as there is a big interface mismatch: survey expects strings as inputs, while our diff functions operate on files,

fixes #424

- Adds a new `Preferences` struct to the config, initially only containing `Editor: bool (default false)`. This struct will be serialized to configs once there is a first tea induced change to the config (eg `tea login default <name>` or `tea login add`). - Use external editor for all multiline prompts if preferred. We already had a function for starting a texteditor for diff reviews; it does not really make sense to replace it with `survey.Editor`, as there is a big interface mismatch: survey expects strings as inputs, while our diff functions operate on files, fixes #424
noerw added this to the v0.9.0 milestone 2021-10-09 14:26:02 +00:00
noerw added the
kind
feature
label 2021-10-09 14:26:02 +00:00
noerw added 2 commits 2021-10-09 14:26:03 +00:00
Some checks failed
continuous-integration/drone/pr Build is failing
7bd1c47373
mulitline prompts: respect editor preference
noerw added 1 commit 2021-10-09 17:02:39 +00:00
All checks were successful
continuous-integration/drone/pr Build is passing
c9f75655d7
lint
zeripath approved these changes 2021-10-10 12:50:39 +00:00
noerw added 1 commit 2021-10-12 06:47:00 +00:00
All checks were successful
continuous-integration/drone/pr Build is passing
05805b6f79
Merge branch 'master' into preferences-editor
lunny approved these changes 2021-10-14 07:27:27 +00:00
noerw added 1 commit 2021-10-14 14:02:37 +00:00
All checks were successful
continuous-integration/drone/pr Build is passing
7d5a22fad4
Merge branch 'master' into preferences-editor
lunny merged commit 78a95f1ca4 into master 2021-10-14 14:36:09 +00:00
noerw deleted branch preferences-editor 2021-10-14 14:40:12 +00:00
Sign in to join this conversation.
No description provided.