aml icon indicating copy to clipboard operation
aml copied to clipboard

Should be able to show data type for boolean/int/float arguments in `--help`.

Open sangee2004 opened this issue 1 year ago • 0 comments

Data type is not shown for boolean and is shown as "string" for int/float arguments in --help.

aml eval ~/example1/Acornfile --help 
Usage of Acornfile:
      --decimal string    
      --newApp            
      --newtext string    
      --number string     
      --oldtext string    
      --profile strings   Available profiles ()

 % cat ~/example1/Acornfile
args: {
	newApp:  true
	oldtext: "old"
	newtext: "new"
        number: 1
        decimal: 4.5
}
containers: {
	mywebnew: {
	image: "nginx"
	ports: publish: "80/http"
	files: {
		"/usr/share/nginx/html/index.html": std.ifelse(args.newApp, args.newtext, args.oldtext)
		"/usr/share/nginx/html/test.html": std.ifelse( args.number == 1, "default", "\(args.number)")
		"/usr/share/nginx/html/test1.html": std.ifelse(args.decimal > 5, "default", "\(args.decimal)")
	}
}
}

sangee2004 avatar Oct 03 '23 21:10 sangee2004