Page MenuHomePhabricator

Add "%R" to csprintf(), for printing more readable commands
ClosedPublic

Authored by epriestley on Jan 29 2014, 10:02 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jan 21, 9:14 AM
Unknown Object (File)
Thu, Jan 16, 1:07 PM
Unknown Object (File)
Sat, Jan 11, 5:15 PM
Unknown Object (File)
Sat, Jan 11, 5:15 PM
Unknown Object (File)
Sat, Jan 11, 5:15 PM
Unknown Object (File)
Fri, Jan 3, 9:54 PM
Unknown Object (File)
Fri, Jan 3, 7:45 AM
Unknown Object (File)
Wed, Jan 1, 12:04 AM
Subscribers

Details

Summary

Ref T4175. The clone commands we print have quoted arguments, but usually don't need them. Add "%R", which is like "%s" but only adds quotes if they're required. This produces slightly more readable commands in the few cases we're generating commands for users to copy/paste.

Test Plan

Added unit tests. Looked up shell metacharacters to double check my definition.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped