feature(konsole) ^P: rm last slash from path

This commit is contained in:
coderaiser 2014-10-01 08:20:45 -04:00
parent d5d2b7bd8b
commit 94a6e11354

View file

@ -1,6 +1,6 @@
var CloudCmd, Util, join, DOM, Console;
var CloudCmd, Util, join, DOM, CloudFunc, Console;
(function(CloudCmd, Util, join, DOM) {
(function(CloudCmd, Util, join, DOM, CloudFunc) {
'use strict';
CloudCmd.Konsole = ConsoleProto;
@ -46,9 +46,12 @@ var CloudCmd, Util, join, DOM, Console;
Console.addShortCuts({
'P': function() {
var command = Console.getPromptText();
var command = Console.getPromptText(),
path = DOM.getCurrentDirPath();
path = CloudFunc.rmLastSlash(path);
command += DOM.getCurrentDirPath();
command += path;
Console.setPromptText(command);
}
});
@ -81,4 +84,4 @@ var CloudCmd, Util, join, DOM, Console;
init();
}
})(CloudCmd, Util, join, DOM);
})(CloudCmd, Util, join, DOM, CloudFunc);