mirror of
https://github.com/nushell/nushell.git
synced 2025-08-12 15:08:13 +02: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:
@ -38,6 +38,11 @@ impl Command for SubCommand {
|
||||
"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(
|
||||
&self,
|
||||
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)"
|
||||
}
|
||||
|
||||
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(
|
||||
&self,
|
||||
engine_state: &nu_protocol::engine::EngineState,
|
||||
|
Reference in New Issue
Block a user