diff --git a/lib/client/konsole.js b/lib/client/konsole.js index 933c1e2b..6d00294c 100644 --- a/lib/client/konsole.js +++ b/lib/client/konsole.js @@ -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);