add warn message for break and continue

This commit is contained in:
WindSoilder 2024-07-17 15:06:07 +08:00
parent e1ef110169
commit cca5e85b7f
2 changed files with 6 additions and 2 deletions

View File

@ -21,7 +21,9 @@ impl Command for Break {
fn extra_usage(&self) -> &str {
r#"This command is a parser keyword. For details, check:
https://www.nushell.sh/book/thinking_in_nu.html"#
https://www.nushell.sh/book/thinking_in_nu.html
WARN: Don't try to use it in closure. Although it will raise error, statements before `break` will be executed"#
}
fn command_type(&self) -> CommandType {

View File

@ -21,7 +21,9 @@ impl Command for Continue {
fn extra_usage(&self) -> &str {
r#"This command is a parser keyword. For details, check:
https://www.nushell.sh/book/thinking_in_nu.html"#
https://www.nushell.sh/book/thinking_in_nu.html
WARN: Don't try to use it in closure. Although it will raise error, statements before `continue` will be executed"#
}
fn command_type(&self) -> CommandType {