mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-07 22:14:04 +08:00
新增linux调用zeal
This commit is contained in:
parent
f0bd83dddd
commit
5c184a3322
@ -43,9 +43,17 @@ readDir = (path,callback) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dash = query => {
|
dash = query => {
|
||||||
let cmd = process.platform == 'win32' ? `start dash-plugin://query=${query}` : `open dash://${query}`;
|
var cmd;
|
||||||
|
if (utools.isWindows()) {
|
||||||
|
cmd = 'start'
|
||||||
|
} else if (utools.isLinux()) {
|
||||||
|
cmd = 'zeal'
|
||||||
|
} else {
|
||||||
|
cmd = 'open'
|
||||||
|
}
|
||||||
|
cmd = cmd + ` dash://${query}`
|
||||||
exec(cmd, (err, stdout, stderr) => {
|
exec(cmd, (err, stdout, stderr) => {
|
||||||
err && utools.showNotification(stderr, clickFeatureCode = null, silent = true);
|
err && utools.showNotification(stderr);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user