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

fixes for Velocity on Windows (switching from 'start' technique to 'cmd /c') #47

Merged
merged 11 commits into from
Jun 19, 2019
Merged

Conversation

cuylerstuwe
Copy link
Contributor

No description provided.

@coveralls
Copy link

coveralls commented Feb 25, 2019

Coverage Status

Coverage remained the same at 100.0% when pulling a66fc05 on salembeats:master into 238d7bc on deerawan:master.

src/dash.ts Outdated
win32: 'start dash-plugin:// && start',
// Same technique as Silverlake Software's "Search Docsets" extension,
// which is written by Velocity's developer and is tested to work with current Velocity on W10.
win32: 'cmd.exe /c start "" ',
Copy link
Owner

Choose a reason for hiding this comment

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

@salembeats have we tested this with Zeal?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I haven't wanted to try it out on Zeal on my main machine because installing Zeal breaks Velocity's integration for Dash URLs. It should work, though. I'll test it on a VM in a minute.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, did some quick testing in VM and Zeal doesn't seem to mind the change:

Code/Zeal VM Screenshot

src/dash.ts Outdated
win32: uri.replace('&', '^&'),
}[this.OS] || '"' + uri + '"'
);
return ({}[this.OS] || '"' + uri + '"');
Copy link
Owner

Choose a reason for hiding this comment

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

should we simplify with this instead?

return '"' + uri + '"';

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Either way works. I kept it open like this just in case any OS-specific formatting is needed again for some reason.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If I were really going all-out into my own personal coding style, and didn't want to keep the (currently no-op) switch expression, I'd probably use backticks:

return `"${uri}"`;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(... especially since the eyes start to blur on the adjacent single/double quotes... )

Copy link
Owner

@deerawan deerawan Mar 10, 2019

Choose a reason for hiding this comment

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

yes, using your solution to use string interpolation is much better. 👍please change it

for OS specific, let's just remove it since we don't use it anymore, we can just refer to it in git history eventually if we need it again.

Perhaps we can get rid of getOSSpecificURI

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done and done.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Simplified the code a bit, then looked at the new merge conflicts and changed it to be compatible with the new "exact" options.

@deerawan
Copy link
Owner

deerawan commented Apr 5, 2019

@salembeats we still have a conflict file here 😃

@cuylerstuwe
Copy link
Contributor Author

Yeah, it's been about a month, so that's not a surprise.

Should be good now.

@cuylerstuwe
Copy link
Contributor Author

Let me double-check a few things and make sure types are right and all of that.

@cuylerstuwe
Copy link
Contributor Author

There we go, good to go. Class is much more concise.

@deerawan
Copy link
Owner

looks good

@deerawan deerawan added this to the 2.2.0 milestone Apr 10, 2019
@deerawan deerawan merged commit 9f98e38 into deerawan:master Jun 19, 2019
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.

None yet

3 participants