Skip to content

Commit

Permalink
Merge 9912279 into 0d36325
Browse files Browse the repository at this point in the history
  • Loading branch information
cuylerstuwe committed Feb 25, 2019
2 parents 0d36325 + 9912279 commit 4008329
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/dash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ export class Dash {
{
darwin: 'open -g',
linux: 'zeal',
// start Zeal before we pass it a URI so it works whether Zeal is running in background or not.
// Why is this needed? I have no idea, but I think Qt has to start up a listener on cmd before it will work.
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 "" ',
}[this.OS] || 'zeal';
}

Expand Down Expand Up @@ -53,11 +53,6 @@ export class Dash {
* @return {string} OS-specific URI to pass to handler, mainly because of Windows
*/
getOSSpecificURI(uri: string): string {
return (
{
// on Windows, start can't deal with the double quotes, and & needs to be escaped with ^
win32: uri.replace('&', '^&'),
}[this.OS] || '"' + uri + '"'
);
return ({}[this.OS] || '"' + uri + '"');
}
}

0 comments on commit 4008329

Please sign in to comment.