nushell / nushell/nushell

`mv` tells me file not exist, when `ls` says it does

Open
#10,404 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A:file-system status:needs-triage
Dominant language
Rust
Stars
40.5k
Forks
2.3k
Avg merge
1d 19h
Merged PRs (30d)
85

Description

Describe the bug

╭ zeph  ~/.local/share 30ms
╰─▶ ls -al /unzfs/cole/.local/share/Steam
╭────┬─────────────────────────────────────────────────────────────────────────────┬─────────┬──────────────────────────────┬─────╮
│  # │                                    name                                     │  type   │            target            │ ... │
├────┼─────────────────────────────────────────────────────────────────────────────┼─────────┼──────────────────────────────┼─────┤
│  0 │ /unzfs/cole/.local/share/Steam/.save                                        │ dir     │                              │ ... │
│  1 │ /unzfs/cole/.local/share/Steam/GameOverlayRenderer64.dll                    │ file    │                              │ ... │
│  2 │ /unzfs/cole/.local/share/Steam/ThirdPartyLegalNotices.css                   │ file    │                              │ ... │
│  3 │ /unzfs/cole/.local/share/Steam/ThirdPartyLegalNotices.doc                   │ file    │                              │ ... │
│  4 │ /unzfs/cole/.local/share/Steam/ThirdPartyLegalNotices.html                  │ file    │                              │ ... │
│  5 │ /unzfs/cole/.local/share/Steam/appcache                                     │ dir     │                              │ ... │
│  6 │ /unzfs/cole/.local/share/Steam/bin                                          │ dir     │                              │ ... │
│  7 │ /unzfs/cole/.local/share/Steam/bin_steamdeps.py                             │ file    │                              │ ... │
│  8 │ /unzfs/cole/.local/share/Steam/bootstrap.tar.xz                             │ file    │                              │ ... │
│  9 │ /unzfs/cole/.local/share/Steam/clientui                                     │ dir     │                              │ ... │
│ 10 │ /unzfs/cole/.local/share/Steam/compatibilitytools.d                         │ symlink │ /home/cole/.steam/root/compa │ ... │
│    │                                                                             │         │ tibilitytools.d              │     │
│ 11 │ /unzfs/cole/.local/share/Steam/config                                       │ dir     │                              │ ... │
│ 12 │ /unzfs/cole/.local/share/Steam/controller_base                              │ dir     │                              │ ... │
│ 13 │ /unzfs/cole/.local/share/Steam/depotcache                                   │ dir     │                              │ ... │
│ 14 │ /unzfs/cole/.local/share/Steam/fossilize_engine_filters.json                │ file    │                              │ ... │
│ 15 │ /unzfs/cole/.local/share/Steam/friends                                      │ dir     │                              │ ... │
│ 16 │ /unzfs/cole/.local/share/Steam/graphics                                     │ dir     │                              │ ... │
│ 17 │ /unzfs/cole/.local/share/Steam/installscriptevalutor_log.txt                │ file    │                              │ ... │
│ 18 │ /unzfs/cole/.local/share/Steam/legacycompat                                 │ dir     │                              │ ... │
│ 19 │ /unzfs/cole/.local/share/Steam/linux32                                      │ dir     │                              │ ... │
│ 20 │ /unzfs/cole/.local/share/Steam/linux64                                      │ dir     │                              │ ... │
│ 21 │ /unzfs/cole/.local/share/Steam/local.vdf                                    │ file    │                              │ ... │
│ 22 │ /unzfs/cole/.local/share/Steam/logs                                         │ dir     │                              │ ... │
│ 23 │ /unzfs/cole/.local/share/Steam/music                                        │ dir     │                              │ ... │
│ 24 │ /unzfs/cole/.local/share/Steam/package                                      │ dir     │                              │ ... │
│ 25 │ /unzfs/cole/.local/share/Steam/public                                       │ dir     │                              │ ... │
│ 26 │ /unzfs/cole/.local/share/Steam/resource                                     │ dir     │                              │ ... │
│ 27 │ /unzfs/cole/.local/share/Steam/servers                                      │ dir     │                              │ ... │
│ 28 │ /unzfs/cole/.local/share/Steam/standalone_installscript_progress_228980.vdf │ file    │                              │ ... │
│ 29 │ /unzfs/cole/.local/share/Steam/steam                                        │ dir     │                              │ ... │
│ 30 │ /unzfs/cole/.local/share/Steam/steam.sh                                     │ file    │                              │ ... │
│ 31 │ /unzfs/cole/.local/share/Steam/steam_msg.sh                                 │ file    │                              │ ... │
│ 32 │ /unzfs/cole/.local/share/Steam/steam_subscriber_agreement.txt               │ file    │                              │ ... │
│ 33 │ /unzfs/cole/.local/share/Steam/steamapps                                    │ dir     │                              │ ... │
│ 34 │ /unzfs/cole/.local/share/Steam/steamclient.dll                              │ file    │                              │ ... │
│ 35 │ /unzfs/cole/.local/share/Steam/steamclient64.dll                            │ file    │                              │ ... │
│ 36 │ /unzfs/cole/.local/share/Steam/steamdeps.txt                                │ file    │                              │ ... │
│ 37 │ /unzfs/cole/.local/share/Steam/steamui                                      │ dir     │                              │ ... │
│ 38 │ /unzfs/cole/.local/share/Steam/steamui-public                               │ dir     │                              │ ... │
│ 39 │ /unzfs/cole/.local/share/Steam/tenfoot                                      │ dir     │                              │ ... │
│ 40 │ /unzfs/cole/.local/share/Steam/ubuntu12_32                                  │ dir     │                              │ ... │
│ 41 │ /unzfs/cole/.local/share/Steam/ubuntu12_64                                  │ dir     │                              │ ... │
│ 42 │ /unzfs/cole/.local/share/Steam/update_hosts_cached.vdf                      │ file    │                              │ ... │
│ 43 │ /unzfs/cole/.local/share/Steam/userdata                                     │ dir     │                              │ ... │
├────┼─────────────────────────────────────────────────────────────────────────────┼─────────┼──────────────────────────────┼─────┤
│  # │                                    name                                     │  type   │            target            │ ... │
╰────┴─────────────────────────────────────────────────────────────────────────────┴─────────┴──────────────────────────────┴─────╯

╭ zeph  ~/.local/share 19ms
╰─▶ mv /unzfs/cole/.local/share/Steam .
Error:   × Could not move "/unzfs/cole/.local/share/Steam" to "/home/cole/.local/share/Steam". Error Kind: No such file or directory (os
  │ error 2)
   ╭─[entry #10:1:1]
 1 │ mv /unzfs/cole/.local/share/Steam .
   ·    ───────────────┬──────────────
   ·                   ╰── could not move
   ╰────

Changing it to ^mv and it works fine.

How to reproduce
  1. Not sure exactly, I've moved other folders without issue.
  2. Maybe it's because it's a different zfs data set?
Expected behavior

It to work

Screenshots

No response

Configuration
key value
version 0.84.1
branch
commit_hash
build_os linux-x86_64
build_target x86_64-unknown-linux-gnu
rust_version rustc 1.72.0 (5680fa18f 2023-08-23) (built from a source tarball)
cargo_version cargo 1.72.0
build_time 1980-01-01 00:00:00 +00:00
build_rust_channel release
allocator mimalloc
features default, sqlite, trash, which, zip
installed_plugins
Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the move from /unzfs/cole/.local/share/Steam to . and compare Nushell's mv with the working ^mv external command. Trace the mv entry point and its handling of this filesystem layout; done means the Nushell command succeeds for this case and the behavior is covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.