diff options
| author | Maxime Coste <mawww@kakoune.org> | 2019-06-23 09:58:31 +1000 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2019-06-23 12:04:21 +1000 |
| commit | a9e778fcc7f06a27f2d06da225f08110c9e2dca9 (patch) | |
| tree | fddb0d17626b07bcc0e8909da64eb99ad441b78e /src/string_utils.hh | |
| parent | 95da8cbc8fc1b7d87e89291bf40c0855d41e3108 (diff) | |
Add support for `echo -quoting (raw|kakoune|shell)` switch
Diffstat (limited to 'src/string_utils.hh')
| -rw-r--r-- | src/string_utils.hh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/string_utils.hh b/src/string_utils.hh index 224dffc2..928070d3 100644 --- a/src/string_utils.hh +++ b/src/string_utils.hh @@ -2,6 +2,7 @@ #define string_utils_hh_INCLUDED #include "string.hh" +#include "enum.hh" #include "vector.hh" #include "optional.hh" @@ -143,6 +144,15 @@ enum class Quoting Shell }; +constexpr auto enum_desc(Meta::Type<Quoting>) +{ + return make_array<EnumDesc<Quoting>, 3>({ + { Quoting::Raw, "raw" }, + { Quoting::Kakoune, "kakoune" }, + { Quoting::Shell, "shell" } + }); +} + inline auto quoter(Quoting quoting) { switch (quoting) |
