notes-cli icon indicating copy to clipboard operation
notes-cli copied to clipboard

BUG filenames with spaces

Open blaggacao opened this issue 5 years ago • 2 comments

notes new test "My foo Note"

notes ls | fzf | xargs -o typora - trying to open "My foo Note" fails due to the spaces

blaggacao avatar May 14 '20 16:05 blaggacao

Concrete example:

notes ls
/home/blaggacao/ghq/keybase/team/p1hq/notas/tickets/gitea-bot.md
/home/blaggacao/ghq/keybase/team/p1hq/notas/minutas/Feedback EPs & Todos.md
/home/blaggacao/ghq/keybase/team/p1hq/notas/tickets/k8s.md
/home/blaggacao/ghq/keybase/team/p1hq/notas/tickets/kssh.md
/home/blaggacao/ghq/keybase/team/p1hq/notas/tickets/goautodial.md
/home/blaggacao/ghq/keybase/team/p1hq/notas/tickets/wireguard.md
notes ls | xargs rg feedback
/home/blaggacao/ghq/keybase/team/p1hq/notas/minutas/Feedback: No such file or directory (os error 2)
EPs: No such file or directory (os error 2)
&: No such file or directory (os error 2)
Todos.md: No such file or directory (os error 2)

blaggacao avatar May 14 '20 16:05 blaggacao

For a fix, in my opinion, I'd would be visually preferable if only the spaced part would get quoted, like so, in order to not disturb the column alignments of the folder parts:

/.../notas/minutas/"Feedback EPs & Todos.md"

blaggacao avatar May 14 '20 16:05 blaggacao