1 | #ifndef NVIM_PATH_H |
2 | #define NVIM_PATH_H |
3 | |
4 | #include "nvim/func_attr.h" |
5 | #include "nvim/types.h" |
6 | #include "nvim/garray.h" |
7 | |
8 | /* Flags for expand_wildcards() */ |
9 | #define EW_DIR 0x01 /* include directory names */ |
10 | #define EW_FILE 0x02 /* include file names */ |
11 | #define EW_NOTFOUND 0x04 /* include not found names */ |
12 | #define EW_ADDSLASH 0x08 /* append slash to directory name */ |
13 | #define EW_KEEPALL 0x10 /* keep all matches */ |
14 | #define EW_SILENT 0x20 /* don't print "1 returned" from shell */ |
15 | #define EW_EXEC 0x40 /* executable files */ |
16 | #define EW_PATH 0x80 /* search in 'path' too */ |
17 | #define EW_ICASE 0x100 /* ignore case */ |
18 | #define EW_NOERROR 0x200 /* no error for bad regexp */ |
19 | #define EW_NOTWILD 0x400 /* add match with literal name if exists */ |
20 | #define EW_KEEPDOLLAR 0x800 /* do not escape $, $var is expanded */ |
21 | /* Note: mostly EW_NOTFOUND and EW_SILENT are mutually exclusive: EW_NOTFOUND |
22 | * is used when executing commands and EW_SILENT for interactive expanding. */ |
23 | #define EW_ALLLINKS 0x1000 // also links not pointing to existing file |
24 | #define EW_SHELLCMD 0x2000 // called from expand_shellcmd(), don't check |
25 | // if executable is in $PATH |
26 | #define EW_DODOT 0x4000 // also files starting with a dot |
27 | #define EW_EMPTYOK 0x8000 // no matches is not an error |
28 | |
29 | /// Return value for the comparison of two files. Also @see path_full_compare. |
30 | typedef enum file_comparison { |
31 | kEqualFiles = 1, ///< Both exist and are the same file. |
32 | kDifferentFiles = 2, ///< Both exist and are different files. |
33 | kBothFilesMissing = 4, ///< Both don't exist. |
34 | kOneFileMissing = 6, ///< One of them doesn't exist. |
35 | kEqualFileNames = 7 ///< Both don't exist and file names are same. |
36 | } FileComparison; |
37 | |
38 | #ifdef INCLUDE_GENERATED_DECLARATIONS |
39 | # include "path.h.generated.h" |
40 | #endif |
41 | #endif |
42 | |