Fast Path impl does not escape special chars like `$`
boozook opened this issue · comments
OS: macOS
Shell: ZSH (default)
I have $
in filenames in some local wiki. Seems to it's "tiddlywiki".
fclones
produces commands like this:
rm '/Users/ak/Documents/GD Wiki/Notes/tiddlers/$__plugins_tiddlywiki_help_HelpPanel_Videos.md'
But instead must be:
rm "/Users/ak/Documents/GD Wiki/Notes/tiddlers/\$__plugins_tiddlywiki_help_HelpPanel_Videos.md"
- with escaped
$
- with normal quotes
"
because single quotes'
is for eval.
Just tried it on macOS and zsh quoting works the same way how fclones assumes it to work:
piotr@mbp fclones (update-deps) % zsh
piotr@mbp fclones (update-deps) % echo '$foo'
$foo
piotr@mbp fclones (update-deps) % echo "$foo"
piotr@mbp fclones (update-deps) %
Single quotes are for literal quoting (no eval), doule quotes do eval.