Skip to content

Commit

Permalink
Add version command line option / gap-system#3735
Browse files Browse the repository at this point in the history
  • Loading branch information
BaseMax committed Feb 21, 2020
1 parent fc65b03 commit 840af76
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/system.g
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ BIND_GLOBAL( "GAPInfo", rec(
# for those options is correct
CommandLineOptionData := [
rec( short:= "h", long := "help", default := false, help := ["print this help and exit"] ),
rec( short:= "v", long := "version", default := false, help := ["print the version and exit"] ),
rec( short:= "b", long := "banner", default := false, help := ["disable/enable the banner"] ),
rec( short:= "q", long := "quiet", default := false, help := ["enable/disable quiet mode"] ),
rec( short:= "e", default := false, help := ["disable/enable quitting on <ctr>-D"] ),
Expand Down Expand Up @@ -480,6 +481,13 @@ CallAndInstallPostRestore( function()
" Default actions are indicated first.\n",
"\n" );
QUIT_GAP();
elif GAPInfo.CommandLineOptions.v then
PRINT_TO( "*errout*",
"KernelVersion ", GAPInfo.KernelVersion, "\n",
"BuildVersion ", GAPInfo.BuildVersion, "\n",
"\n" );
# PRINT_TO( "*errout*",GAPInfo.KernelVersion);
QUIT_GAP();
fi;
end );

Expand Down

0 comments on commit 840af76

Please sign in to comment.