mirror of
https://github.com/nushell/nushell.git
synced 2025-04-16 09:18:21 +02:00
Change 'file name' => 'name'. Same for type
This commit is contained in:
parent
5ec5167cb9
commit
720cc03649
@ -15,7 +15,7 @@ crate fn dir_entry_dict(
|
|||||||
) -> Result<Spanned<Value>, ShellError> {
|
) -> Result<Spanned<Value>, ShellError> {
|
||||||
let mut dict = SpannedDictBuilder::new(span);
|
let mut dict = SpannedDictBuilder::new(span);
|
||||||
let filename = entry.file_name();
|
let filename = entry.file_name();
|
||||||
dict.insert("file name", Value::string(filename.to_string_lossy()));
|
dict.insert("name", Value::string(filename.to_string_lossy()));
|
||||||
|
|
||||||
let metadata = entry.metadata()?;
|
let metadata = entry.metadata()?;
|
||||||
|
|
||||||
@ -27,7 +27,7 @@ crate fn dir_entry_dict(
|
|||||||
FileType::Symlink
|
FileType::Symlink
|
||||||
};
|
};
|
||||||
|
|
||||||
dict.insert("file type", Value::string(format!("{:?}", kind)));
|
dict.insert("type", Value::string(format!("{:?}", kind)));
|
||||||
dict.insert(
|
dict.insert(
|
||||||
"readonly",
|
"readonly",
|
||||||
Value::boolean(metadata.permissions().readonly()),
|
Value::boolean(metadata.permissions().readonly()),
|
||||||
|
Loading…
Reference in New Issue
Block a user