Skip to content

Commit

Permalink
Repeating long CLI flags will not toggle behaviour (#5440)
Browse files Browse the repository at this point in the history
  • Loading branch information
lispandfound committed Feb 15, 2024
1 parent 6c7b6c5 commit af76dd6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/system.g
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,9 @@ CallAndInstallPostRestore( function()
else
opt := GAPInfo.CommandLineOptionCanonicalName.( opt );
value:= CommandLineOptions.( opt );
if IS_BOOL( value ) then
if IS_BOOL( value ) and word[2] = '-' then
CommandLineOptions.( opt ):= true;
elif IS_BOOL( value ) then
CommandLineOptions.( opt ):= not CommandLineOptions.( opt );
elif IS_INT( value ) then
CommandLineOptions.( opt ):= CommandLineOptions.( opt ) + 1;
Expand Down Expand Up @@ -496,7 +498,7 @@ CallAndInstallPostRestore( function()

PRINT_TO("*stdout*",
"\n",
" Boolean options toggle the current value each time they are called.\n",
" Short boolean options toggle the current value each time they are called.\n",
" Default actions are indicated first.\n",
"\n" );
QuitGap();
Expand Down

0 comments on commit af76dd6

Please sign in to comment.