[gjs: 1/2] debugger: Fix summary help



commit ffbf5165ab2ff75fd56c94ab0206c59174d5df50
Author: Florian Müllner <fmuellner gnome org>
Date:   Wed May 8 22:04:14 2019 +0200

    debugger: Fix summary help
    
    After commit 0846ada6a0, printcmd() no longer receives an array of
    command synonyms, but a single command object with an 'aliases' key.
    
    Adjust the function accordingly to fix showing the summary help.
    
    https://gitlab.gnome.org/GNOME/gjs/merge_requests/293

 modules/_bootstrap/debugger.js | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/modules/_bootstrap/debugger.js b/modules/_bootstrap/debugger.js
index b28d23b6..f3cbb9ef 100644
--- a/modules/_bootstrap/debugger.js
+++ b/modules/_bootstrap/debugger.js
@@ -677,9 +677,8 @@ for (var i = 0; i < commandArray.length; i++) {
 function _printCommandsList() {
     print('Available commands:');
 
-    var printcmd = function (group) {
-        var summary = group.find((cmd) => !!cmd.summary);
-        print(`  ${group.map((c) => c.name).join(', ')} -- ${(summary || {}).summary}`);
+    var printcmd = function (cmd) {
+        print(`  ${cmd.aliases.join(', ')} -- ${cmd.summary}`);
     };
 
     var cmdGroups = _groupCommands();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]