diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2016-10-13 19:46:09 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2016-10-13 19:46:09 +0100 |
| commit | 1f3e424047176da8ab48dca800f80fbe147e5f1f (patch) | |
| tree | dfd2ab3f8ccdedb0834ede3382edcef07ead750b /src/file.hh | |
| parent | ee5c24686158a94d8be590b695028da2310fb115 (diff) | |
Do not expand filenames when doing insert filename completion
Fixes #855
Diffstat (limited to 'src/file.hh')
| -rw-r--r-- | src/file.hh | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/file.hh b/src/file.hh index 2dde1abb..2c73ed7b 100644 --- a/src/file.hh +++ b/src/file.hh @@ -5,6 +5,7 @@ #include "completion.hh" #include "exception.hh" #include "regex.hh" +#include "flags.hh" #include <sys/types.h> #include <sys/stat.h> @@ -83,8 +84,18 @@ constexpr bool operator!=(const timespec& lhs, const timespec& rhs) return not (lhs == rhs); } +enum class FilenameFlags +{ + None = 0, + OnlyDirectories = 1 << 0, + Expand = 1 << 1 +}; + +template<> struct WithBitOps<FilenameFlags> : std::true_type {}; + CandidateList complete_filename(StringView prefix, const Regex& ignore_regex, - ByteCount cursor_pos = -1, bool only_dir = false); + ByteCount cursor_pos = -1, + FilenameFlags flags = FilenameFlags::None); CandidateList complete_command(StringView prefix, ByteCount cursor_pos = -1); |
