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)
Fri, Jan 3, 9:54 PM
Unknown Object (File)
Fri, Jan 3, 7:45 AM
Unknown Object (File)
Wed, Jan 1, 12:04 AM
Unknown Object (File)
Sat, Dec 14, 10:50 AM
Unknown Object (File)
Dec 6 2024, 8:07 AM
Unknown Object (File)
Dec 4 2024, 11:00 PM
Unknown Object (File)
Nov 26 2024, 3:51 PM
Unknown Object (File)
Nov 21 2024, 9:42 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