/**
 * Run this macro with a remote file open to execute an SSH command on the remote server.
 *
 * @source https://github.com/Komodo/macros
 * @author Todd Whiteman
 * @contributor Carey Hoffman, Sergey Kislyakov
 * @version 0.4
 */

function getRemoteSSHConnection() {
    var remoteConnectionSvc = Components.classes["@activestate.com/koRemoteConnectionService;1"].
            getService(Components.interfaces.koIRemoteConnectionService);
    // Use the current file's URI.
    var view = ko.views.manager.currentView;
    var uri = view.document && view.document.file.URI || view.koDoc.file.URI; // Support K7 koDoc
    if (uri.substr(0, 1) != "s") {
        throw Error("The current file is not a remote SSH file. Open a remote file first.");
    }
    var conn = remoteConnectionSvc.getConnectionUsingUri(uri);
    if (conn) {
        // Ensure it's an SSH connection
        conn.QueryInterface(Components.interfaces.koISSHConnection);
    }
    else
    {
        throw Error("Not an SSH connection. Please open the file through SSH.");
    }
    return conn
}
var conn = getRemoteSSHConnection();
var stdout = {};
var stderr = {};
var command = prompt("Type a command: ");
(command.trim() == "") ? command = "ls -la" : command = command;
var retval = conn.runCommand(command, false, stdout, stderr);

ko.notifications.add('Remote Run Command',
                     ['Remote Command', "Macro Monday"],
                     'remote_run_command',
                     { severity : Components.interfaces.koINotification.SEVERITY_INFO, description : stdout.value });


@@ -1001,16 +1001,17 @@
 nection.
+ 
  Please 
@@ -1177,16 +1177,18 @@
 nd: %22);%0A
+if
 (command
@@ -1206,9 +1206,13 @@
 %22%22) 
-?
+%7B%0A   
  com
@@ -1230,29 +1230,11 @@
 -la%22
- : command = command;
+;%0A%7D
 %0Avar

Change what cgchoffman ask