From 71b12a9ed4e4fac201acd4c8144920b8a2352887 Mon Sep 17 00:00:00 2001 From: Joakim Persson Date: Fri, 17 Jul 2026 13:06:22 +0200 Subject: [PATCH] docs(skill): note macOS NFD-filename gotcha for dscp/scp MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Accented filenames on a macOS host are stored decomposed (NFD), so a precomposed (NFC) remote path in scp/dscp silently fails with 'No such file or directory'. Document the wildcard / list-first workaround in the pi-devbox-environment skill, next to the dssh/dscp alias table. (Hit while copying a screenshot named 'Skärmavbild ….png' from the host.) --- .../skills/pi-devbox-environment/SKILL.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/rootfs/usr/local/share/pi-devbox/skills/pi-devbox-environment/SKILL.md b/rootfs/usr/local/share/pi-devbox/skills/pi-devbox-environment/SKILL.md index 0fc40f5..17400bd 100644 --- a/rootfs/usr/local/share/pi-devbox/skills/pi-devbox-environment/SKILL.md +++ b/rootfs/usr/local/share/pi-devbox/skills/pi-devbox-environment/SKILL.md @@ -91,6 +91,22 @@ are "command not found" there — you must spell out the underlying command. If a command "works in my terminal but not when the agent runs it," this alias gap is the first thing to suspect. +**`dscp`/`scp` with accented filenames on a macOS host.** macOS stores filenames +in Unicode **NFD** (decomposed — e.g. `ä` is `a` + combining U+0308), while the +string you type or paste is usually **NFC** (precomposed `ä`, U+00E4). The bytes +differ, so a precomposed remote path *silently* fails to match on the host — +`scp … "mac:'~/Desktop/Skärmavbild ….png'"` returns *No such file or directory* +even though the file plainly exists. Sidestep the encoding entirely: let the +**remote shell expand a wildcard**, or list the directory first and copy the +exact name it prints. + +```sh +# glob dodges the NFC/NFD mismatch (the remote shell matches the real bytes): +scp -F "$HOME/.ssh-local/config" "mac:~/Desktop/Sk*rmavbild*.png" ./ +# or read the exact filename first, then copy that: +ssh -F "$HOME/.ssh-local/config" mac 'ls -1 ~/Desktop/*.png' +``` + ## 3. Reaching the Docker host and its LAN over SSH When the host is VM-backed (e.g. OrbStack / Docker Desktop on macOS) the