xstdcmap -version behaves oddly
On the commandline I ussed
"xstdcmap -version"
3 times.
Exactly that command.
The result, however had, varies (!!!):
xstdcmap -version
xstdcmap 1.0.5
xstdcmap -version
xstdcmap 1.0.5
xstdcmap -version
usage: xstdcmap [-options]
where options include:
-all make all standard colormaps for the display
-best make the RGB_BEST_MAP
-blue make the RGB_BLUE_MAP
-default make the RGB_DEFAULT_MAP
-delete map remove a standard colormap
-display dpy X server to use
-gray make the RGB_GRAY_MAP
-green make the RGB_GREEN_MAP
-red make the RGB_RED_MAP
-verbose turn on logging
-version print version info
First two results are correct. In the last event, though, it shows as if this command was not known. (Note that this does not always happen; it appears to be semi-random when this happens. Just now I tested it again: four times it worked fine, then the two follow-up times led to the full display of ALL help-options. And then it is back to showing only the version, oddly enough.)
How did I discover this bug?
I am using a ruby script to query, on the commandline, the version of many programs, preferring pkg-config if possible; if not I first use --version then -v then -version. On that note, by the way, it would be nice if xstdcmap would also support --version.
xstdcmap is the only program from the xorg-suite I can see that behaves inconsistently: sometimes it reports the version, sometimes it seems to show the result of --help. The other xorg-programs behave correctly, so I suspect something must be wrong with xstdcmap's source code. Or perhaps some other function is called that leads to the above awkward behaviour.
I'd otherwise assume -version to ALWAYS show the same reproducible output, but this is not the case with regard to xstdcmap, for a reason that is not obvious to me.