diff options
author | axel <axel@liljencrantz.se> | 2007-02-09 19:33:50 +1000 |
---|---|---|
committer | axel <axel@liljencrantz.se> | 2007-02-09 19:33:50 +1000 |
commit | 104ec963c2d267ef44edc6509f3269babc0addf1 (patch) | |
tree | e1a8e0e1ba5f86bed2887d846beb60ec99fcafbd /complete.h | |
parent | 08eb92707a81ea4e611169e7592a58a4557a297b (diff) |
First phase of using a real struct for passing around completions - only use it on things returned by complete(), e.g. use it in the reader
darcs-hash:20070209093350-ac50b-d91fe87be4612a56bff2139349cefa28a504cbb7.gz
Diffstat (limited to 'complete.h')
-rw-r--r-- | complete.h | 38 |
1 files changed, 38 insertions, 0 deletions
@@ -67,6 +67,44 @@ #define PROG_COMPLETE_SEP L'\t' /** + Do not insert space afterwards if this is the only completion. (The + default is to try insert a space) +*/ +#define COMPLETE_NO_SPACE 1 + +/** + This compeltion is case insensitive +*/ + +#define COMPLETE_NO_CASE 2 +/** + This compeltion is the whole argument, not just the remainder. This + flag must never be set on completions returned from the complete() + function. It is strictly for internal use in the completion code. +*/ +#define COMPLETE_WHOLE_ARGUMENT 4 + +typedef struct +{ + /** + The completion string + */ + const wchar_t *completion; + /** + The description for this completion + */ + const wchar_t *description; + /** + Determines whether a spece should be inserted after this + compeltion if it is the only possible completion. Can be one of + COMPLETE_SPACE_YES, COMPLETE_SPACE_NO and COMPLETE_SPACE_AUTO. + */ + int flags; +} + completion_t; + + +/** Add a completion. |