~emersion/mrsh

ref: 537899b8a63adf88d442790b4cf6a38edd9288d9 mrsh/include/shell/path.h -rw-r--r-- 389 bytes
537899b8Simon Ser shell/arithm: strip mrsh_ prefix for static functions 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
#ifndef SHELL_PATH_H
#define SHELL_PATH_H

#include <mrsh/shell.h>
#include <stdbool.h>

/** Searches $PATH for the requested file and returns it if found. If exec is
 * true, it will require the file to be executable in order to be considered a
 * match. Fully qualified paths are returned as-is. */
const char *expand_path(struct mrsh_state *state, const char *file, bool exec);

#endif