Skip to content

Conversation

@jankeromnes
Copy link
Contributor

@jankeromnes jankeromnes commented Mar 8, 2021

Fixes #3309

How to test

  1. https://jx-gp-open-code.staging.gitpod-dev.com/#https://github.com/gitpod-io/sveltejs-template
  2. gp open package.json

Should work in both Theia and Code.

@jankeromnes jankeromnes changed the title [gp] Make 'gp open' try 'GP_OPEN_EDITOR' before falling back to 'vi' [WIP][gp] Make 'gp open' try 'GP_OPEN_EDITOR' before falling back to 'vi' Mar 8, 2021
@jankeromnes jankeromnes force-pushed the jx/gp-open-code branch 2 times, most recently from 09ad4a3 to c2964f9 Compare March 8, 2021 10:26
@jankeromnes jankeromnes changed the title [WIP][gp] Make 'gp open' try 'GP_OPEN_EDITOR' before falling back to 'vi' [gp] Make 'gp open' try 'GP_OPEN_EDITOR' before falling back to 'vi' Mar 8, 2021
@jankeromnes
Copy link
Contributor Author

gp open <file> now works in Code:

Screenshot 2021-03-08 at 11 47 26

Also still works in Theia:

Screenshot 2021-03-08 at 11 47 39

@jankeromnes jankeromnes changed the title [gp] Make 'gp open' try 'GP_OPEN_EDITOR' before falling back to 'vi' [gp] Make 'gp open' try GP_OPEN_EDITOR before falling back to 'vi' Mar 8, 2021
@jankeromnes jankeromnes changed the title [gp] Make 'gp open' try GP_OPEN_EDITOR before falling back to 'vi' [gp] Make 'gp open <file>' work in Code as well Mar 8, 2021
@akosyakov
Copy link
Member

Could you set up preview env variable too? I will make use of it later.

@jankeromnes
Copy link
Contributor Author

Could you set up preview env variable too?

@akosyakov Sure! But what should be the name & value of this preview variable? (Couldn't find a relevant example in the codebase).

@akosyakov
Copy link
Member

gp preview should check GP_PREVIEW env variable as a fallback. Actually let's open another issue for it. It depends on #2806

@jankeromnes
Copy link
Contributor Author

@akosyakov Thanks! Filed as #3382 -- please feel free to comment/edit/assign as relevant.

@jankeromnes
Copy link
Contributor Author

jankeromnes commented Mar 8, 2021

Otherwise this PR is ready to go. @csweichel or @akosyakov please take a look when you have time. 🙏

Copy link
Contributor

@csweichel csweichel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :)

Copy link
Member

@akosyakov akosyakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM too

@jankeromnes jankeromnes merged commit 2cae501 into main Mar 9, 2021
@jankeromnes jankeromnes deleted the jx/gp-open-code branch March 9, 2021 08:00
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 this pull request may close these issues.

gp cli: open and preview support for other IDEs

3 participants