When invoking Watch with arguments which contain spaces, the arguments are not preserved. For example, this command works as expected in an rc session:
% printf '%s %s %s\n' 1 2 3
1 2 3
But when run through Watch:
Watch printf '%s %s %s\n' 1 2 3
We would expect the argument parsing rc does when invoking Watch to be preserved, however the first string is split again:
To avoid this, Watch will need to quote any arguments with whitespace so that they are parsed correctly by rc again.
When invoking
Watchwith arguments which contain spaces, the arguments are not preserved. For example, this command works as expected in anrcsession:But when run through
Watch:We would expect the argument parsing
rcdoes when invokingWatchto be preserved, however the first string is split again:To avoid this,
Watchwill need to quote any arguments with whitespace so that they are parsed correctly byrcagain.