ARB
Functions
arb_pattern.cxx File Reference
#include "arb_pattern.h"
#include "arb_core.h"
#include "arb_strbuf.h"
#include "arb_msg.h"
#include <wordexp.h>
Include dependency graph for arb_pattern.cxx:

Go to the source code of this file.

Functions

chararb_shell_expand (const char *str)
 

Function Documentation

char* arb_shell_expand ( const char str)

Performs shell-like path expansion on

Parameters
str
  • Tilde-Expansion
  • Environment variable substitution
  • Command substitition
  • Arithmetic expansion
  • Wildcard expansion
  • Quote removal

The implementation uses wordexp (see man wordexp).

Returns
Expanded string (must be freed)

Definition at line 22 of file arb_pattern.cxx.

References ARB_strdup(), GBS_strstruct::cat(), error(), GB_export_errorf(), NULp, GBS_strstruct::put(), GBS_strstruct::release(), and result.

Referenced by arb_open_socket().