path.h 1.89 KB
Newer Older
1 2
#ifndef NVIM_PATH_H
#define NVIM_PATH_H
3

4 5 6
#include "nvim/func_attr.h"
#include "nvim/types.h"
#include "nvim/garray.h"
7

8 9 10 11 12 13 14 15 16 17 18 19
/* Flags for expand_wildcards() */
#define EW_DIR          0x01    /* include directory names */
#define EW_FILE         0x02    /* include file names */
#define EW_NOTFOUND     0x04    /* include not found names */
#define EW_ADDSLASH     0x08    /* append slash to directory name */
#define EW_KEEPALL      0x10    /* keep all matches */
#define EW_SILENT       0x20    /* don't print "1 returned" from shell */
#define EW_EXEC         0x40    /* executable files */
#define EW_PATH         0x80    /* search in 'path' too */
#define EW_ICASE        0x100   /* ignore case */
#define EW_NOERROR      0x200   /* no error for bad regexp */
#define EW_NOTWILD      0x400   /* add match with literal name if exists */
Florian Walch's avatar
Florian Walch committed
20
#define EW_KEEPDOLLAR   0x800   /* do not escape $, $var is expanded */
21 22
/* Note: mostly EW_NOTFOUND and EW_SILENT are mutually exclusive: EW_NOTFOUND
* is used when executing commands and EW_SILENT for interactive expanding. */
Jurica Bradaric's avatar
Jurica Bradaric committed
23
#define EW_ALLLINKS     0x1000  // also links not pointing to existing file
KillTheMule's avatar
KillTheMule committed
24
#define EW_SHELLCMD     0x2000  // called from expand_shellcmd(), don't check
KillTheMule's avatar
KillTheMule committed
25
                                //  if executable is in $PATH
Jurica Bradaric's avatar
Jurica Bradaric committed
26
#define EW_DODOT        0x4000  // also files starting with a dot
Jurica Bradaric's avatar
Jurica Bradaric committed
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 32 33 34 35
  kEqualFiles = 1,        ///< Both exist and are the same file.
  kDifferentFiles = 2,    ///< Both exist and are different files.
  kBothFilesMissing = 4,  ///< Both don't exist.
  kOneFileMissing = 6,    ///< One of them doesn't exist.
  kEqualFileNames = 7     ///< Both don't exist and file names are same.
36 37
} FileComparison;

38 39 40
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "path.h.generated.h"
#endif
41
#endif