void AutoComplete() { _acIndex++; if (_acIndex == 0) { _startCommand = _command; } if (_command.StartsWith("cd ") || _command.StartsWith("rmdir ") || _command.StartsWith("cpdir ")) { _command = _fileController.Autocomplete(_startCommand, _acIndex, false); } else if (_command.StartsWith("rm ") || _command.StartsWith("edit ") || _command.StartsWith("ren ") || _command.StartsWith("cp ") || _command.StartsWith("run ")) { _command = _fileController.Autocomplete(_startCommand, _acIndex, true); } else { _command = CommandHelper.Autocomplete(_startCommand, _acIndex); } if (_command == _startCommand) { _acIndex = -1; } UpdateLine(); }