Macros | Functions
os_unix.c File Reference
#include <assert.h>
#include <errno.h>
#include <inttypes.h>
#include <stdbool.h>
#include <string.h>
#include "nvim/api/private/handle.h"
#include "nvim/vim.h"
#include "nvim/ascii.h"
#include "nvim/os_unix.h"
#include "nvim/buffer.h"
#include "nvim/charset.h"
#include "nvim/eval.h"
#include "nvim/ex_cmds.h"
#include "nvim/fileio.h"
#include "nvim/getchar.h"
#include "nvim/main.h"
#include "nvim/mbyte.h"
#include "nvim/memline.h"
#include "nvim/memory.h"
#include "nvim/message.h"
#include "nvim/misc1.h"
#include "nvim/mouse.h"
#include "nvim/garray.h"
#include "nvim/path.h"
#include "nvim/screen.h"
#include "nvim/strings.h"
#include "nvim/syntax.h"
#include "nvim/ui.h"
#include "nvim/types.h"
#include "nvim/os/os.h"
#include "nvim/os/time.h"
#include "nvim/os/input.h"
#include "nvim/os/shell.h"
#include "nvim/os/signal.h"
#include "nvim/msgpack_rpc/helpers.h"

Macros

#define SHELL_SPECIAL   (char_u *)"\t \"&'$;<>()\\|"
 
#define STYLE_ECHO   0 /* use "echo", the default */
 
#define STYLE_GLOB   1 /* use "glob", for csh */
 
#define STYLE_VIMGLOB   2 /* use "vimglob", for Posix sh */
 
#define STYLE_PRINT   3 /* use "print -N", for zsh */
 
#define STYLE_BT
 

Functions

void mch_exit (int r) FUNC_ATTR_NORETURN
 
int mch_expand_wildcards (int num_pat, char_u **pat, int *num_file, char_u ***file, int flags) FUNC_ATTR_NONNULL_ARG(3) FUNC_ATTR_NONNULL_ARG(4)
 

Macro Definition Documentation

#define SHELL_SPECIAL   (char_u *)"\t \"&'$;<>()\\|"
#define STYLE_BT
Value:
4 /* `cmd` expansion, execute the pattern
* directly */
#define STYLE_ECHO   0 /* use "echo", the default */
#define STYLE_GLOB   1 /* use "glob", for csh */
#define STYLE_PRINT   3 /* use "print -N", for zsh */
#define STYLE_VIMGLOB   2 /* use "vimglob", for Posix sh */

Function Documentation

void mch_exit ( int  r)
int mch_expand_wildcards ( int  num_pat,
char_u **  pat,
int *  num_file,
char_u ***  file,
int  flags 
)

Does wildcard pattern matching using the shell.

Parameters
num_patis the number of input patterns.
patis an array of pointers to input patterns.
[out]num_fileis pointer to number of matched file names. Set to the number of pointers in *file.
[out]fileis pointer to array of pointers to matched file names. Memory pointed to by the initial value of *file will not be freed. Set to NULL if FAIL is returned. Otherwise points to allocated memory.
flagsis a combination of EW_* flags used in expand_wildcards(). If matching fails but EW_NOTFOUND is set in flags or there are no wildcards, the patterns from pat are copied into *file.
Returns
OK for success or FAIL for error.