-
Notifications
You must be signed in to change notification settings - Fork 47
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 open command results in a new tab #47
Conversation
add status bar item to RunLineInEditor class add execution timing to RunLineInEditor class
@chrisdias @chrmarti is there anything I can do to move this PR along? |
@mburleigh Sorry, we were heads-down into another part of the VS Code project. I'll take a look. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! I have added a few comments.
this.parsedResult = undefined; | ||
this.query = undefined; // TODO | ||
const cursor = source.selection.active; | ||
const line = source.document.lineAt(cursor).text; | ||
const isPlainText = (line.indexOf('--query') !== -1) || (line.indexOf('-h') !== -1) || (line.indexOf('--help') !== -1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you do this in a separate PR? And maybe check the output if it starts and ends with {}
or []
to assume it is JSON. That would handle more cases.
const document = editor.document; | ||
if (documentLanguage) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better to always update because in the case where the document is reused, it might receive JSON again after plain text.
Closing this PR as you split out separate ones. |
The Rest Client extension (https://marketplace.visualstudio.com/items?itemName=humao.rest-client) has functionality like this and after using the Azure CLI Tools extension for a while I missed being able to have the results of multiple commands available. This will open a new results tab every time "Run Line in Editor" is executed.