Closed ncallister closed 3 months ago
Good catch Nathan! I have pushed a bug fix that is a little more robust than your PR, where $path
is instead passed as an arg to printf
. I figured out what initially caused the issue with printf "%s\0" "$path"
not working: git ls-files
escapes special chars, which makes a lot of sense, but that means we need to re-interpret the escaped chars with printf
. By telling git to nulbyte delimit the paths we avoid that whole escaping/re-interpreting and can just pass them along verbatim.
p.s.: The changes are now available in the testing branch, so go ahead and switch to that if you want to run it right away :-)
homeshick link
is now working with all files using the testing
branch. Thank you :grinning:
Merged to master
There are some applications which create files with % characters in them such as
.config/kate/externaltools/Insert\%20UUID.ini
. Unfortunately printf interprets the % character as an escape character and so thehomeshick link
command fails with the message:.homesick/repos/homeshick/lib/commands/link.sh: line 108: printf:
U': invalid format character`.