Bug - Not A Bug Repeat gCLI command isn't updating repetition count

gCLI output:

> use 1 fancy tin beer can; repeat 16

Using 1 fancy tin beer can...
You acquire an item: tin cup
Finished using 1 fancy tin beer can.
Repetition 1 of 16...
Using 1 fancy tin beer can...
You acquire an item: tin cup
Finished using 1 fancy tin beer can.
... last four lines repeated 14 more times ...
Repetition 1 of 16...
Searching for "fancy tin beer can"...
Search complete.
Purchasing fancy tin beer can (1 @ 3,090)...
Purchases complete.
Using 1 fancy tin beer can...
You acquire an item: tin cup
Finished using 1 fancy tin beer can.

When it got here I hit escape to abort what KoLmafia was doing. Running r14352.
 

Darzil

Developer
Haven't looked at the code (much), but it looks like it repeats the last line, rather than the last command.
Does
> use 1 fancy tin beer can
> repeat 16
work?
 

Darzil

Developer
So I guess this is not a bug, but there is a possible feature request to make the repeat command work on last command rather than last line.

It's not one I'd spend any time looking at, though.
 

xKiv

Active member
Maybe repeat should not repeat the entire line on which it is? As in, do not execute any repeats while already repeating?
Does/should anybody use anything like this:
Code:
> print something # or do something else
> repeat 2
> repeat 3
?
 
Personally, I'd like to see "repeat" changed so it works with multiple commands on one line, with repeat being the final command. The logical way to handle this case is to split the line into 2 - all other commands form virtual line 1 and the repeat command virtual line 2, then process as with other repeat commands. It does NOT need to be changed to repeat the last command rather than the last line.
 
Top