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)
Thu, Nov 21, 9:42 AM
Unknown Object (File)
Sun, Oct 27, 9:21 AM
Unknown Object (File)
Oct 18 2024, 8:12 PM
Unknown Object (File)
Oct 11 2024, 4:02 PM
Unknown Object (File)
Oct 11 2024, 4:02 PM
Unknown Object (File)
Oct 11 2024, 4:02 PM
Unknown Object (File)
Oct 9 2024, 3:23 PM
Unknown Object (File)
Oct 9 2024, 3:23 PM
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