 
 : do-help ( args command-loop -- )
     over empty? [
-        "Available commands:" print
-        "-------------------" print
+        nl
+        "Commands available:" print
+        "===================" print
         nip commands>> [ name>> ] map natural-sort
         [ 6 <groups> ] [ longest length 4 + ] bi
-        '[ [ _ CHAR: \s pad-tail write ] each nl ] each
+        '[ [ _ CHAR: \s pad-tail write ] each nl ] each nl
     ] [
         dupd find-command [
             nip help>> print


USING: accessors ascii assocs combinators grouping io kernel
math sequences sorting splitting ;

IN: command-loop


    "List available commands with 'help' or detailed help with 'help cmd'"
    { "?" } <command> ;

: do-abbrevs ( args command-loop -- )
    nl
    "Commands abbreviated:" print
    "=====================" print
    nip abbrevs>> sort-keys [
        "%-7s %s\n" printf
    ] assoc-each nl ;

: <abbrevs-command> ( command-loop -- command )
    "abbrevs" swap '[ _ do-abbrevs ]
    "List abbreviated commands" f <command> ;

PRIVATE>

: new-command-loop ( intro prompt class -- command-loop )
