Skip to content

Commit 6d9ab45

Browse files
authored
Enhance the help message for invalid command in datafusion-cli (apache#18603)
## Which issue does this PR close? <!-- We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123. --> - Closes apache#18375 . ## What changes are included in this PR? Enhance the help message for invalid command, add the `help` command in the help message. <!-- There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR. --> ## Are these changes tested? Manual test <img width="737" height="190" alt="image" src="https://github.com/user-attachments/assets/073d4b96-db6f-448b-a7a4-3f9fa456a72e" /> <!-- We typically require tests for all PRs in order to: 1. Prevent the code from being accidentally broken by subsequent changes 2. Serve as another way to document the expected behavior of the code If tests are not included in your PR, please explain why (for example, are they covered by existing tests)? --> ## Are there any user-facing changes? No <!-- If there are user-facing changes then we may require documentation to be updated before approving the PR. --> <!-- If there are any breaking changes to public APIs, please add the `api change` label. -->
1 parent 0c0b5fe commit 6d9ab45

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

datafusion-cli/src/exec.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ pub async fn exec_from_repl(
153153
}
154154
} else {
155155
eprintln!(
156-
"'\\{}' is not a valid command",
156+
"'\\{}' is not a valid command, you can use '\\?' to see all commands",
157157
&line[1..]
158158
);
159159
}
@@ -168,7 +168,7 @@ pub async fn exec_from_repl(
168168
}
169169
}
170170
} else {
171-
eprintln!("'\\{}' is not a valid command", &line[1..]);
171+
eprintln!("'\\{}' is not a valid command, you can use '\\?' to see all commands", &line[1..]);
172172
}
173173
}
174174
Ok(line) => {

0 commit comments

Comments
 (0)