mrnugget/fzz — pull request #3 by ebfe (2014-04-19 13:59:54+00:00)
Title: Don't Join/Split command template

Currently the command template is a single string that is Joined from flag.Args() and later split again on space. This destroys argument boundaries if any of the arguments or the placeholder replacement contains a space.

For example:

$ echo "foo" >> "has space.txt"
$ fzz grep {{}} *.txt
>> f
grep: has: No such file or directory
grep: space.txt: No such file or directory

$ fzz grep {{}} *.go
>> replacement has space
grep: has: No such file or directory
grep: space: No such file or directory

Instead of Join/Split, just keep the template in a []string preserving the argument boundaries.