mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-25 17:04:16 +00:00
feature(konsole) ^P: rm last slash from path
This commit is contained in:
parent
d5d2b7bd8b
commit
94a6e11354
1 changed files with 8 additions and 5 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue