Homec4science

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

Authored by epriestley <git@epriestley.com> on Jan 30 2014, 18:04.

Description

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

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.

Reviewers: btrahan, chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T4175

Differential Revision: https://secure.phabricator.com/D8099

Details

Committed
epriestley <git@epriestley.com>Jan 30 2014, 18:04
Pushed
aubortMar 17 2017, 12:03
Parents
rPHUf12025abc05b: Fix infinite loop in PhutilFileTree
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHUe60dca3649f4: Add "%R" to csprintf(), for printing more readable commands (authored by epriestley <git@epriestley.com>).Jan 30 2014, 18:04