            }
                              commandHistory.unshift(command);
                              index = -1;
                            };
        getPreviousCommand = function(){
                              if(index+1 < commandHistory.length){index = index+1;}
                              else if(commandHistory[index]){return ""}
                              return commandHistory[index];
                            };
        getNextCommand = function(){
                              if(inde