Currently, tee -o "test file" creates a file literally named "test file". This essentially makes it impossible to indicate files/paths that include whitespace without adding the literal quotes.
Explain how this is achieved.
Uses void rewrite_filename(std::string &filename) to rewrite the path. As a nice side effect, ~/tilde paths are now expanded as well.
If applicable, please suggest to reviewers how they can test the change.
What are the reasons/motivation for this change?
Currently,
tee -o "test file"
creates a file literally named"test file"
. This essentially makes it impossible to indicate files/paths that include whitespace without adding the literal quotes.Explain how this is achieved.
Uses
void rewrite_filename(std::string &filename)
to rewrite the path. As a nice side effect, ~/tilde paths are now expanded as well.If applicable, please suggest to reviewers how they can test the change.
Just try
tee -o "test file"
before and after.