| 32 | } |
| 33 | |
| 34 | MetadataResult ChangeDirectory(ShellState &state, const vector<string> &args) { |
| 35 | if (state.safe_mode) { |
| 36 | state.PrintF(PrintOutput::STDERR, ".cd cannot be used in -safe mode\n"); |
| 37 | return MetadataResult::FAIL; |
| 38 | } |
| 39 | auto result = state.ChangeDirectory(args[1]); |
| 40 | return result == SuccessState::SUCCESS ? MetadataResult::SUCCESS : MetadataResult::FAIL; |
| 41 | } |
| 42 | |
| 43 | MetadataResult ToggleChanges(ShellState &state, const vector<string> &args) { |
| 44 | state.SetOrClearFlag(ShellFlags::SHFLG_CountChanges, args[1]); |
nothing calls this directly
no test coverage detected