File tree Expand file tree Collapse file tree 3 files changed +13
-7
lines changed
Expand file tree Collapse file tree 3 files changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -106,9 +106,15 @@ rec {
106106 )
107107 helps ;
108108
109- prefix = attrByPath path ( config . prefix or "" ) prefixes ;
110-
111- expose = attrByPath path ( config . expose or ( ! forPackages ) ) exposes ;
109+ prefix = attrByPath path config . prefix prefixes ;
110+
111+ expose = attrByPath path
112+ (
113+ if config . expose != null
114+ then config . expose
115+ else ( ! forPackages )
116+ )
117+ exposes ;
112118 in
113119 {
114120 "${ if forPackages then "package" else "command" } " = value ;
Original file line number Diff line number Diff line change 166166
167167 expose = mkOption {
168168 type = types . nullOr types . bool ;
169- default = false ;
169+ default = null ;
170170 description = ''
171171 Can be used as ${ flat "expose" } for all
172172 ${ nested "packages" } and ${ nested "commands" } .
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ let inherit (pkgs) lib; in
6262 {
6363 category = "category 1" ;
6464 command = "${ lib . getExe pkgs . gawk } $@" ;
65- expose = false ;
65+ expose = true ;
6666 help = "[command] run awk" ;
6767 name = "a.b.awk" ;
6868 package = null ;
@@ -71,7 +71,7 @@ let inherit (pkgs) lib; in
7171 {
7272 category = "category 1" ;
7373 command = "${ lib . getExe pkgs . jq } $@" ;
74- expose = false ;
74+ expose = true ;
7575 help = "[command] run jq" ;
7676 name = "a.b.jq-2" ;
7777 package = null ;
@@ -80,7 +80,7 @@ let inherit (pkgs) lib; in
8080 {
8181 category = "category 1" ;
8282 command = ''printf "hello\n"'' ;
83- expose = false ;
83+ expose = true ;
8484 help = ''[command] print "hello"'' ;
8585 name = "command with spaces" ;
8686 package = null ;
You can’t perform that action at this time.
0 commit comments