aboutsummaryrefslogtreecommitdiffhomepage
path: root/reader.h
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-07-17 00:38:04 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-07-19 12:41:34 -0700
commit92099c7af23d0cebf52f89de4f9d829825e53ac8 (patch)
treeb9251df8338f19a58bb4f9fd32b968ac6ced98f9 /reader.h
parent58ad04b61cf567c7a8756869f19d6d5682122b12 (diff)
Initial abbreviation work. Tests currently fail.
Diffstat (limited to 'reader.h')
-rw-r--r--reader.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/reader.h b/reader.h
index dfe8d1ed..0ead2aa4 100644
--- a/reader.h
+++ b/reader.h
@@ -204,6 +204,10 @@ void reader_set_right_prompt(const wcstring &prompt);
/** Sets whether autosuggesting is allowed. */
void reader_set_allow_autosuggesting(bool flag);
+/** Sets whether abbreviation expansion is performed. */
+void reader_set_expand_abbreviations(bool flag);
+
+
/** Sets whether the reader should exit on ^C. */
void reader_set_exit_on_interrupt(bool flag);
@@ -243,6 +247,9 @@ int reader_search_mode();
/* Given a command line and an autosuggestion, return the string that gets shown to the user. Exposed for testing purposes only. */
wcstring combine_command_and_autosuggestion(const wcstring &cmdline, const wcstring &autosuggestion);
+/* Expand abbreviations at the given cursor position. Exposed for testing purposes only. */
+bool reader_expand_abbreviation_in_command(const wcstring &cmdline, size_t cursor_pos, wcstring *output);
+
/* Apply a completion string. Exposed for testing only. */
wcstring completion_apply_to_command_line(const wcstring &val_str, complete_flags_t flags, const wcstring &command_line, size_t *inout_cursor_pos, bool append_only);