@@ -169,7 +169,7 @@ Usage from C code
169* Feel free to mutate both the pointer ``data`` (eg. after calling ``realloc``)
169* Feel free to mutate both the pointer ``data`` (eg. after calling ``realloc``)
170 and the memory it points to. However, keep in mind
170 and the memory it points to. However, keep in mind
171 that this must not break Idris's referential transparency.
171 that this must not break Idris's referential transparency.
173* **WARNING!** If you call ``cdata_allocate`` or ``cdata_manage``,
173* **WARNING!** If you call ``cdata_allocate`` or ``cdata_manage``,
174 the resulting ``CData`` object *must* be returned from your
174 the resulting ``CData`` object *must* be returned from your
175 FFI function so that it is inserted in the C heap by the RTS.
175 FFI function so that it is inserted in the C heap by the RTS.
@@ -184,7 +184,7 @@ Usage from C code
184 other_fun cd i = foreign FFI_C "other_fun" (CData -> Int -> IO Int) cd i
184 other_fun cd i = foreign FFI_C "other_fun" (CData -> Int -> IO Int) cd i
186.. code:: cpp
186.. code:: cpp
188 #include "idris_rts.h"
188 #include "idris_rts.h"
190 static void finalizer(void * data)
190 static void finalizer(void * data)
@@ -310,3 +310,26 @@ Reflection
310Including ``%reflection`` functions and ``quoteGoal x by fn in t``,
310Including ``%reflection`` functions and ``quoteGoal x by fn in t``,
311which applies ``fn`` to the expected type of the current expression, and
311which applies ``fn`` to the expected type of the current expression, and
312puts the result in ``x`` which is in scope when elaborating ``t``.
312puts the result in ``x`` which is in scope when elaborating ``t``.
317+Use of ``optparse-applicative`` allows Idris to support Bash
318+completion. You can obtain the completion script for Idris using the
321+ idris --bash-completion-script `which idris`
324+To enable completion for the lifetime of your current session, run the
327+ source <(idris --bash-completion-script `which idris`)
330+To enable completion permenatly you must either:
332+* Modify your bash init script with the above command.
334+* Add the completion script to the appropriate ``bash_completion.d/``
335+ folder on your machine.