Verified Commit 7018495d authored by Alberto Miranda's avatar Alberto Miranda ♨️
Browse files

Add formatter for `scord_ctl::config::command`

parent 92549fb9
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -247,4 +247,23 @@ private:

} // namespace scord_ctl::config

/**
 * @brief Formatter for `scord_ctl::config::command`.
 */
template <>
struct fmt::formatter<scord_ctl::config::command> {
    template <typename ParseContext>
    constexpr auto
    parse(ParseContext& ctx) {
        return ctx.begin();
    }

    template <typename FormatContext>
    auto
    format(const scord_ctl::config::command& cmd, FormatContext& ctx) {
        return fmt::format_to(ctx.out(), "{}", cmd.cmdline());
    }
};


#endif // SCORD_CONFIG_HPP