diff options
author | Jörg Thalheim <joerg@thalheim.io> | 2017-07-30T11·27+0100 |
---|---|---|
committer | Jörg Thalheim <joerg@thalheim.io> | 2017-07-30T11·32+0100 |
commit | 2fd8f8bb99a2832b3684878c020ba47322e79332 (patch) | |
tree | 65a667fbc746f4ff8efcaca3c0a58565985f26a5 /src/libutil/args.cc | |
parent | c7654bc491d9ce7c1fbadecd7769418fa79a2060 (diff) |
Replace Unicode quotes in user-facing strings by ASCII
Relevant RFC: NixOS/rfcs#4 $ ag -l | xargs sed -i -e "/\"/s/’/'/g;/\"/s/‘/'/g"
Diffstat (limited to 'src/libutil/args.cc')
-rw-r--r-- | src/libutil/args.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libutil/args.cc b/src/libutil/args.cc index 19a45d7e9b37..2b72079f2b47 100644 --- a/src/libutil/args.cc +++ b/src/libutil/args.cc @@ -47,7 +47,7 @@ void Args::parseCmdline(const Strings & _cmdline) } else if (!dashDash && std::string(arg, 0, 1) == "-") { if (!processFlag(pos, cmdline.end())) - throw UsageError(format("unrecognised flag ‘%1%’") % arg); + throw UsageError(format("unrecognised flag '%1%'") % arg); } else { pendingArgs.push_back(*pos++); @@ -103,7 +103,7 @@ bool Args::processFlag(Strings::iterator & pos, Strings::iterator end) Strings args; for (size_t n = 0 ; n < flag.arity; ++n) { if (pos == end) - throw UsageError(format("flag ‘%1%’ requires %2% argument(s)") + throw UsageError(format("flag '%1%' requires %2% argument(s)") % name % flag.arity); args.push_back(*pos++); } @@ -131,7 +131,7 @@ bool Args::processArgs(const Strings & args, bool finish) { if (expectedArgs.empty()) { if (!args.empty()) - throw UsageError(format("unexpected argument ‘%1%’") % args.front()); + throw UsageError(format("unexpected argument '%1%'") % args.front()); return true; } @@ -155,10 +155,10 @@ bool Args::processArgs(const Strings & args, bool finish) void Args::mkHashTypeFlag(const std::string & name, HashType * ht) { - mkFlag1(0, name, "TYPE", "hash algorithm (‘md5’, ‘sha1’, ‘sha256’, or ‘sha512’)", [=](std::string s) { + mkFlag1(0, name, "TYPE", "hash algorithm ('md5', 'sha1', 'sha256', or 'sha512')", [=](std::string s) { *ht = parseHashType(s); if (*ht == htUnknown) - throw UsageError(format("unknown hash type ‘%1%’") % s); + throw UsageError(format("unknown hash type '%1%'") % s); }); } |