Skip to content

It's not possible to run the ls command inside directories that contain characters "[]" #9232

@Wint3rmute

Description

@Wint3rmute

Describe the bug

When attempting to list files inside a directory which name contain characters [ and ], nushell fails to display the file list.

How to reproduce

I'm building the main branch at 18th May, but the behaviour is also reproducible on the Arch Linux nushell package (version 0.80.0):

cargo r
mkdir "[test]"
cd "[test]"
ls # this will work as the folder is empty
touch file
ls # this will fail
Error: 
  × No matches found for *
   ╭─[entry #5:1:1]
 1 │ ls
   · ─┬
   ·  ╰── Pattern, file or folder not found
   ╰────
  help: no matches found

Expected behavior

nushell should list the files present in the folder, no matter what characters are present in the folder's name.

Screenshots

image

Configuration

key value
version 0.80.1
branch main
commit_hash e752d8a
build_os linux-x86_64
build_target x86_64-unknown-linux-gnu
rust_version rustc 1.67.1 (d5a82bbd2 2023-02-07)
rust_channel 1.67.1-x86_64-unknown-linux-gnu
cargo_version cargo 1.67.1 (8ecd4f20a 2023-01-10)
build_time 2023-05-18 22:20:13 +02:00
build_rust_channel debug
features default, zip
installed_plugins

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:needs-triageAn issue that hasn't had any proper look

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions