1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 10:07:59 +01:00

make vimperator.system() Windows aware

This commit is contained in:
Doug Kearns
2007-10-06 14:35:38 +00:00
parent 505cc2d0ed
commit c4cddc478d
3 changed files with 17 additions and 7 deletions

View File

@@ -1647,14 +1647,15 @@ function Commands() //{{{
// TODO: if special, run the last command
var output = vimperator.system(args)
if (typeof output === "string")
vimperator.echo(output);
vimperator.echo(vimperator.util.escapeHTML(output));
else
// FIXME: why are we accepting only a string return value from v.system()? -- djk
vimperator.echoerr("Invalid system command: " + args);
},
{
usage: "!{command}",
usage: ["!{command}"],
short_help: "Run a command",
help: "Runs {command} through system() and displays its output." +
help: "Runs {command} through system() and displays its output. " +
"Input redirection (< foo) not done, do not run commands which require stdin or it will hang Firefox!"
}
));