commandHistoryIndex

var commandHistoryIndex: Int

Which command was most recently retrieved by a cursor key since the last command was submitted. -1 indicates no command has been retrieved by a cursor key, or that the entire list has been cycled an integral number of times (and the command line was blanked upon reaching -1).