diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2016-08-05 13:53:19 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2016-08-05 13:53:19 +0100 |
| commit | 5b7b6eebafc025a33a2fba39f1873d4d09a04d86 (patch) | |
| tree | 5b0136043bd704542af5801c82ed998a75b7eab3 /src/completion.hh | |
| parent | 38d372567bab6f55d82d1e672485e8b9b23e59b2 (diff) | |
Regenerate shell-candidates for each completion sessions
That should allow fixing the #665 issue while still avoiding to
run a potentially long shell command on each keystroke.
Diffstat (limited to 'src/completion.hh')
| -rw-r--r-- | src/completion.hh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/completion.hh b/src/completion.hh index a44f11f3..6743194e 100644 --- a/src/completion.hh +++ b/src/completion.hh @@ -4,6 +4,7 @@ #include <functional> #include <algorithm> +#include "flags.hh" #include "units.hh" #include "string.hh" #include "vector.hh" @@ -34,9 +35,13 @@ struct Completions enum class CompletionFlags { - None, - Fast + None = 0, + Fast = 1 << 0, + Start = 1 << 2, }; + +template<> struct WithBitOps<CompletionFlags> : std::true_type {}; + using Completer = std::function<Completions (const Context&, CompletionFlags, StringView, ByteCount)>; |
