summaryrefslogtreecommitdiff
path: root/src/command_manager.cc
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2019-11-26 21:34:22 +1100
committerMaxime Coste <mawww@kakoune.org>2019-11-26 21:34:22 +1100
commit9716c7c82d43af3c6ffe2a4ad534a19c7728b866 (patch)
tree5d3c90ef682d64fd43b9dcaee3c61a1a023fe50e /src/command_manager.cc
parent2f8100b36240bdf0873172bf9cd1ac86f103275b (diff)
parentae85753c411df1dabe593d14f3b601ea15569f00 (diff)
Merge remote-tracking branch 'lenormf/complete-expansion-file'
Diffstat (limited to 'src/command_manager.cc')
-rw-r--r--src/command_manager.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/command_manager.cc b/src/command_manager.cc
index 099ee244..7eca7cd6 100644
--- a/src/command_manager.cc
+++ b/src/command_manager.cc
@@ -9,6 +9,7 @@
#include "optional.hh"
#include "option_types.hh"
#include "ranges.hh"
+#include "regex.hh"
#include "register_manager.hh"
#include "shell_manager.hh"
#include "utils.hh"
@@ -689,6 +690,13 @@ Completions CommandManager::complete(const Context& context,
ShellManager::instance().complete_env_var(
token.content, cursor_pos_in_token) };
+ case Token::Type::FileExpand:
+ {
+ const auto& ignored_files = context.options()["ignored_files"].get<Regex>();
+ return {start , cursor_pos, complete_filename(
+ token.content, ignored_files, cursor_pos_in_token, FilenameFlags::Expand) };
+ }
+
case Token::Type::Raw:
case Token::Type::RawQuoted:
case Token::Type::RawEval: