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
F18768035: D8099.id.diff
Oct 8 2025, 1:26 AM
F18762445: D8099.id18322.diff
Oct 6 2025, 7:03 PM
F18557156: D8099.id.diff
Sep 8 2025, 7:52 PM
F18513159: D8099.diff
Sep 5 2025, 9:13 AM
F18271668: D8099.diff
Aug 22 2025, 4:40 PM
F18271647: D8099.diff
Aug 22 2025, 4:39 PM
F18140962: D8099.id.diff
Aug 14 2025, 5:27 AM
Unknown Object (File)
Jun 17 2025, 8:39 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