aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/complete.h
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2015-08-02 17:58:37 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2015-08-08 13:55:49 -0700
commit97f1a8fe91abeda594945648c11b7f399df45135 (patch)
tree5737e5c2e721b08fb5cfc7949a18a2f8f4d3d1bb /src/complete.h
parent0ac9f159d6b8235195d63f1669ca33dbc2474f47 (diff)
Factor the completion prefix behavior into its own function
In a few places, we need to add a prefix to completions that replace the token. This change factors that logic into its own function prepend_token_prefix.
Diffstat (limited to 'src/complete.h')
-rw-r--r--src/complete.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/complete.h b/src/complete.h
index 466ddbe9..deb0c42a 100644
--- a/src/complete.h
+++ b/src/complete.h
@@ -125,6 +125,9 @@ public:
/* "Naturally less than" means in a natural ordering, where digits are treated as numbers. For example, foo10 is naturally greater than foo2 (but alphabetically less than it) */
static bool is_naturally_less_than(const completion_t &a, const completion_t &b);
static bool is_alphabetically_equal_to(const completion_t &a, const completion_t &b);
+
+ /* If this completion replaces the entire token, prepend a prefix. Otherwise do nothing. */
+ void prepend_token_prefix(const wcstring &prefix);
};
enum