Closed scottbrown closed 8 years ago
Hey @scottbrown, Thanks for reporting this so thoroughly. I'll be able to create test cases for just this. My initial thought is it might be a bug in the yaml-parser I'm using. I'll do some investigation to find where the error lies and how it can be addressed.
Thanks for testing it out!
This is not the yaml parser at all. It's simple string quoting in the terminal. Currently it is sending the command as noted above: cd ~/JustPlainSimple Technologies Inc./financials/ledgers
. We can fix this by quoting the directory we desire changing to as cd "~/JustPlainSimple Technologies Inc./financials/ledgers"
.
I've written an integration spec that verified the bug, and the above fix for it.
Any thoughts on that as a fix, causing problems down the road for variants of possible root dirs?
There shouldn't be any problems with your fix, as the point of the root
key is a directory, so the entire value can be wrapped in quotes. This will also help if/when you ship a Windows binary, as they use whitespace more often in directory names (e.g. Program Files
). It won't break anything on POSIX systems either, as the way to deal with directories and filenames with whitespace (or other escape characters) is to wrap it in quotes (e.g. mv "/vol/This is a file.txt"
) and is considered best practice in Bash scripts.
I know, it's bad form to have spaces in directory names. But when I used one of my existing tmuxinator configuration files that opens up a directory with spaces in it, muxed incorrectly parses only the first word instead of the entire string.
Config:
Output: