Skip to content

Error: File(s) not found when the name contains square brackets #10749

@munzirtaha

Description

@munzirtaha

Describe the bug

Using back-quoted filenames, I can use the touch command to create a file named [23].txt but I cannot remove it.

How to reproduce

~> touch `[23].mp4`
~> rm `[23].mp4`
Error:   × File(s) not found
   ╭─[entry #52:1:1]
 1 │ rm `[23].mp4`
   ·    ─────┬────
   ·         ╰── File(s) not found
   ╰────

Expected behavior

external commands should behave consistently with back-quoted strings

Screenshots

No response

Configuration

version | transpose key value | to md --pretty 10/18/23 02:13:53 AM
| key | value |
| ------------------ | ---------------------------------------------------------------- |
| version | 0.85.0 |
| branch | makepkg |
| commit_hash | a6f62e0 |
| build_os | linux-x86_64 |
| build_target | x86_64-unknown-linux-gnu |
| rust_version | rustc 1.72.1 (d5c2e9c34 2023-09-13) (Arch Linux rust 1:1.72.1-1) |
| cargo_version | cargo 1.72.1 |
| build_time | 2023-09-22 08:35:37 +00:00 |
| build_rust_channel | release |
| allocator | mimalloc |
| features | dataframe, default, extra, sqlite, trash, which, zip |
| installed_plugins

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    A:globBehavior around file-system globbing with regular commands or `glob`. See also A:quoting/expansionstatus: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