function onFinish() {
			var n;
			var i;
			var j;

			if ( nargs === 0 ) {
				// Evaluate the last command...
				repl._rli.write( repl._history[ len-2 ]+'\n' );
				return;
			}
			if ( FLG === 1 ) {
				// TODO: subsequence string parsing (use an iterator!!!)
				return;
			}
			if ( FLG === 2 ) {
				i = len - (3*arg);
				if ( i < 0 ) {
					n = len / 3;
					i = 0;
				} else {
					n = arg;
				}
				// Evaluate the most recent `n` commands...
				i += 1;
				j = 0;
				for ( ; i < len; i += 3 ) {
					repl._rli.write( repl._history[ i ]+'\n' );
					if ( j < n-1 ) {
						displayPrompt( repl, false );
					}
					j += 1;
				}
				return;
			}
			if ( FLG === 3 ) {
				// Scan the history for the most recent command matching the regular expression...
				for ( i = len-2; i >= 0; i -= 3 ) {
					if ( arg.test( repl._history[ i ] ) ) {
						repl._rli.write( repl._history[ i ]+'\n' );
						return;
					}
				}
				return;
			}
			// Case: FLG === 4
			n = arg.length;
			for ( i = 0; i < n; i++ ) {
				// Scan the history for the command identifier...
				for ( j = 0; j < len; j += 3 ) {
					if ( arg[ i ] === repl._history[ j ] ) {
						repl._rli.write( repl._history[ j+1 ]+'\n' );
						if ( i < n-1 ) {
							displayPrompt( repl, false );
						}
						break;
					}
				}
			}
		}
Callback invoked once the `rerun()` command finishes.

@private
@param {string} cmd - command
@param {boolean} success - boolean indicating whether the command successfully executed
@returns {void}