From 720cc03649b7e014a2709939a9f8baa34d2feeb4 Mon Sep 17 00:00:00 2001 From: Jonathan Turner Date: Sun, 14 Jul 2019 16:59:36 +1200 Subject: [PATCH 1/2] Change 'file name' => 'name'. Same for type --- src/object/files.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/object/files.rs b/src/object/files.rs index 0e031b1544..7cea20a405 100644 --- a/src/object/files.rs +++ b/src/object/files.rs @@ -15,7 +15,7 @@ crate fn dir_entry_dict( ) -> Result, ShellError> { let mut dict = SpannedDictBuilder::new(span); 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()?; @@ -27,7 +27,7 @@ crate fn dir_entry_dict( FileType::Symlink }; - dict.insert("file type", Value::string(format!("{:?}", kind))); + dict.insert("type", Value::string(format!("{:?}", kind))); dict.insert( "readonly", Value::boolean(metadata.permissions().readonly()), From 2f7f78094d2ca77df996dee9b60a63a80a296360 Mon Sep 17 00:00:00 2001 From: Jonathan Turner Date: Sun, 14 Jul 2019 17:09:07 +1200 Subject: [PATCH 2/2] Fix test --- tests/unit.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit.txt b/tests/unit.txt index 8804a0f7b0..e4b9829114 100644 --- a/tests/unit.txt +++ b/tests/unit.txt @@ -1,4 +1,4 @@ cd tests cd dirtest -ls | where size > 1kb | get "file name" | trim | echo $it +ls | where size > 1kb | get name | trim | echo $it exit \ No newline at end of file