Skip to content

mv $path_containing_glob_chars /path/to/dest not working  #11838

@klesh

Description

@klesh

Describe the bug

mv command reports file not found when the source path contains glob characters like [

How to reproduce

  1. touch a[b].txt
  2. let $f = "a[b].txt"
  3. mv $f ab.txt
    × File not found
    ╭─[entry Add to_toml export #56:1:1]
    1 │ mv $f ab.txt
    · ─┬
    · ╰── file not found
    ╰────

Expected behavior

The variable should be treated as a literal path or --literal should be offered as an optional flag.

Screenshots

image

Configuration

key value
version 0.90.1
branch
commit_hash c2992d5
build_os windows-x86_64
build_target x86_64-pc-windows-msvc
rust_version rustc 1.73.0 (cc66ad468 2023-10-03)
rust_channel 1.73.0-x86_64-pc-windows-msvc
cargo_version cargo 1.73.0 (9c4383fb5 2023-08-26)
build_time 2024-02-07 02:25:09 +00:00
build_rust_channel release
allocator mimalloc
features default, sqlite, trash, which, 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

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions