Short version of the help and version flags
leoheck opened this issue · 9 comments
Is it possible to add a short version of these most important flags --help
and --verbose
(-v
-h
)?
Short version -h
for help, ok, but -v is usually used for verbose, not version.
Sure, the right thing is -V
for version.
I would like to have this -V
or --version
working because for me it is important to check if running your original plotgitsh
version or my custom build.
I just don't know yet how to change this version number. It looks like it is opam dependent, since when I build it with makefile the version is missing.
Why?
There is one thing that it is important for kdiff
to work. Being able to save to
and from
images even if they don't have any difference.
I believe you still don't have such a feature, right?
For instance, if we have a flag that allows that, then I could end with my fork to use your repo instead which is a better option, I think since users will have your version installed and not mine.
The way I am achieving this is by removing a test where it compares if images are different before doing the visual diff.
The best thing to do would create a command-line parameter allowing this. However, I believe this test could also be removed because it is good to show to the user an image without any changes. So, this is what the user is expecting.
Well, once the comparison has no differences plotgistch
could return a value higher than 0 indicating that, if needed.
I would like to have this
-V
or--version
working because for me it is important to check if running your originalplotgitsh
version or my custom build.
Isn't the version working? if you type plotgitsch --version
what does it print?
When I install it by pinning it I see this.
➜ plotgitsch --version
%%VERSION%%
The substitution with the content of git describe
is only performed when calling dune subst
in the directory.
So I would recommend:
$ opam install dune
$ dune subst
$ opam pin add -y -k path kicadsch .
$ opam pin add -y -k path plotkicadsch .
$ opam install -y plotkicadsch
Let me know if it changes your version string.
Look promising, but I am not sure what is going on.
[NOTE] Package kicadsch is already pinned to file:///home/lheck/Dropbox/Documents/plotkicadsch_lheck (version 0.8.0-35-g00077d7-dirty).
[kicadsch.0.8.0-35-g00077d7-dirty] synchronised from file:///home/lheck/Dropbox/Documents/plotkicadsch_lheck
[WARNING] Failed checks on kicadsch package definition from source at file:///home/lheck/Dropbox/Documents/plotkicadsch_lheck:
error 3: File format error in 'version' at line 2, column 0: Duplicate field version
error 3: File format error in 'version' at line 3, column 0: Duplicate field version
kicadsch is now pinned to file:///home/lheck/Dropbox/Documents/plotkicadsch_lheck (version 0.8.0-35-g00077d7-dirty)
Already up-to-date.
Nothing to do.
opam pin remove
did the trick.
➜ plotgitsch --version
v0.8.0-35-g00077d7
Pretty nice, thanks.
I think the dune subst
command modifies the working directory. Don't forget to restore the file plotkicadsch/src/plotgitsch.ml
when applying it again.