-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Improve "gp open" #598
Comments
I like the idea to reuse open. Also we should not open non-localhost (or workspace) http URLs in preview as they are most likely don't work. |
another idea: allow While there is the unlikely possibility that a number is a valid port and a valid file, this ambiguity can be resolved by specifying one of the |
Should I'd find this very useful when I navigated deep into some folder structure in the Terminal and want to continue in that context in the File View. currently, I get
|
Idea to use |
We have So the other options to |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@shaal and many other users were looking for this feature. |
Thank you @axonasif |
I wonder if we can have something for opening files from Although it would be great to have that control on the cli too! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Currently, we have terminal commands
gp open
andgp preview
. I think they can be merged and improved.idea:
gp open [flags] URL|FILE
with flags:
--browser
opens URL in new browser tab--preview-browser
opens a URL in the Preview View--editor
opens a FILE in an editor--preview-file
opens a FILE in the in preview-readonly-editor, the one that renders markdown.If no flags are provided, the default should be:
Also, when a URL is provided, the command should check if it's pointing to
localhost
or an internal Ip address and if so, re-write the URL to its public format with the logic ofgp url <port>
. This would solve #596.On second thought,
gp open
andgp preview
have no intersecting functionality, so it may be better to keep them separate commands. However, the terminology does overlap, because we have a "preview" for files (the markdown renderer).This could be solved by instead having the commands:
gp open FILE
opens editorgp open --preview FILE
opens rendered markdown in read-only editorgp browse URL
opens preview viewgp browse --external URL
opens URL in external browser windowThe text was updated successfully, but these errors were encountered: