Commits

Juri Pakaste committed e596f9c

Added a paragraph about --text to README

Comments (0)

Files changed (1)

 
 You can use ``-`` as the file name, in which case ``nsstringfromenumgen`` expects to receive the file contents from standard input. You can use this to feed a single enum definition ``nsstringfromenumgen``, instead of a whole source file. However, if you're using the recently added ``NS_ENUM`` and ``NS_OPTIONS`` macros, you'll need to use the ``--include`` flag to include ``NSObjCRuntime.h`` (or another header that includes it, such as ``Foundation.h``.)
 
+Another option for including partial code is ``--text`` which allows you to supply the code as a string parameter, eg ``nsstringfromenumgen --text "typedef enum { TestEnumFirst, TestEnumSecond } TestEnum;"``. And as above you use the ``--include`` flag for headers. This option is useful at least with AppCode which doesn't support Services but has the External Tools section in Preferences.
+
 If your code relies on a prefix header, you need to include it on the command line with the ``--include`` flag. You can specify more than one of them if necessary.
 
 You can also instruct ``nsstringfromenumgen`` to treat your enums as options for a bitmask by including the ``--mask`` flag::