diff --git a/HELP.md b/HELP.md index 796e4e0e..bc8865bd 100644 --- a/HELP.md +++ b/HELP.md @@ -138,6 +138,7 @@ Console |Key |Operation |:----------------------|:-------------------------------------------- | `~` | open +| `Ctrl` + `P` | paste path of current directory | `Esc` | close Config diff --git a/lib/client/console.js b/lib/client/console.js index e317ce86..f5718051 100644 --- a/lib/client/console.js +++ b/lib/client/console.js @@ -68,6 +68,13 @@ var CloudCmd, Util, DOM, CloudFunc, $; jqconsole.AbortPrompt(); handler(); }); + + jqconsole.RegisterShortcut('P', function() { + var command = jqconsole.GetPromptText(); + + command += DOM.getCurrentDirPath(); + jqconsole.SetPromptText(command); + }); } CloudCmd.View.show(Element, {