File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 21
21
esc = "" ;
22
22
ansiOrange = "${ esc } [38;5;202m" ;
23
23
ansiReset = "${ esc } [0m" ;
24
+ ansiBold = "${ esc } [1m" ;
24
25
25
26
commandsToMenu = commands :
26
27
let
57
58
len = maxCommandLength - ( builtins . stringLength name ) ;
58
59
in
59
60
if help == null || help == "" then
60
- name
61
+ " ${ name } "
61
62
else
62
- "${ pad name len } - ${ help } " ;
63
+ " ${ pad name len } - ${ help } " ;
63
64
in
64
- "\n [${ name } ]\n " + builtins . concatStringsSep "\n " ( map opCmd value ) ;
65
+ "\n ${ ansiBold } [${ name } ]${ ansiReset } \n \n " + builtins . concatStringsSep "\n " ( map opCmd value ) ;
65
66
in
66
- builtins . concatStringsSep "\n " ( map opCat commandByCategoriesSorted )
67
+ builtins . concatStringsSep "\n " ( map opCat commandByCategoriesSorted ) + " \n "
67
68
;
68
69
69
70
# Because we want to be able to push pure JSON-like data into the
222
223
help = "prints this menu" ;
223
224
name = "menu" ;
224
225
command = ''
225
- cat <<'DEVSHELL_MENU'
226
- ${ commandsToMenu config . commands }
227
- DEVSHELL_MENU
226
+ menu="${ commandsToMenu config . commands } "
227
+ echo -e "$menu"
228
228
'' ;
229
229
}
230
230
] ;
You can’t perform that action at this time.
0 commit comments