mirror of
https://github.com/nushell/nushell.git
synced 2025-01-11 08:48:23 +01:00
Add help
warnings for path exists
and path type
regarding usage (#7062)
* Add help warnings to `path exists` and `path type` * Correction
This commit is contained in:
parent
2b9f258126
commit
cd89304706
@ -36,7 +36,7 @@ impl Command for SubCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn extra_usage(&self) -> &str {
|
fn extra_usage(&self) -> &str {
|
||||||
"into duration does not take leap years into account and every month is calculated with 30 days"
|
"This command does not take leap years into account, and every month is assumed to have 30 days."
|
||||||
}
|
}
|
||||||
|
|
||||||
fn search_terms(&self) -> Vec<&str> {
|
fn search_terms(&self) -> Vec<&str> {
|
||||||
|
@ -38,6 +38,11 @@ impl Command for SubCommand {
|
|||||||
"Check whether a path exists"
|
"Check whether a path exists"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn extra_usage(&self) -> &str {
|
||||||
|
r#"This only checks if it is possible to either `open` or `cd` to the given path.
|
||||||
|
If you need to distinguish dirs and files, please use `path type`."#
|
||||||
|
}
|
||||||
|
|
||||||
fn run(
|
fn run(
|
||||||
&self,
|
&self,
|
||||||
engine_state: &nu_protocol::engine::EngineState,
|
engine_state: &nu_protocol::engine::EngineState,
|
||||||
|
@ -36,6 +36,11 @@ impl Command for SubCommand {
|
|||||||
"Get the type of the object a path refers to (e.g., file, dir, symlink)"
|
"Get the type of the object a path refers to (e.g., file, dir, symlink)"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn extra_usage(&self) -> &str {
|
||||||
|
r#"This checks the file system to confirm the path's object type.
|
||||||
|
If nothing is found, an empty string will be returned."#
|
||||||
|
}
|
||||||
|
|
||||||
fn run(
|
fn run(
|
||||||
&self,
|
&self,
|
||||||
engine_state: &nu_protocol::engine::EngineState,
|
engine_state: &nu_protocol::engine::EngineState,
|
||||||
|
Loading…
Reference in New Issue
Block a user