Currently if you specify --no-gen and --gen then --no-gen always takes precedence. Same with --no-min and --min.
I have configured a shell alias scc='scc --no-cocomo --no-size --sort code' to use the flags I like by default. I am adding --no-gen because by default I want to exclude generated code but sometimes I'd still like to see it (to check if the generated files were recognized correctly). However if I add --no-gen to my shell alias then I can no longer temporarily override it by running scc --gen (I'd have to do \scc --gen which looses my other default flags or configure a separate shell alias, neither is very ergonomic.)
I looked into implementing this. scc uses cobra but the flag handling is done by pflag, a POSIX-style replacement for the stdlib flag module. It seems like this would be easiest to implement with BoolFunc, support for which has apparently been added to pflag last month ... so I think this would best wait for the next pflag release.
Currently if you specify
--no-genand--genthen--no-genalways takes precedence. Same with--no-minand--min.I have configured a shell alias
scc='scc --no-cocomo --no-size --sort code'to use the flags I like by default. I am adding--no-genbecause by default I want to exclude generated code but sometimes I'd still like to see it (to check if the generated files were recognized correctly). However if I add--no-gento my shell alias then I can no longer temporarily override it by runningscc --gen(I'd have to do\scc --genwhich looses my other default flags or configure a separate shell alias, neither is very ergonomic.)I looked into implementing this. scc uses cobra but the flag handling is done by pflag, a POSIX-style replacement for the stdlib flag module. It seems like this would be easiest to implement with BoolFunc, support for which has apparently been added to
pflaglast month ... so I think this would best wait for the next pflag release.