~emersion/mrsh

ref: 1c6cbcf40da4e92c3c4fc5a2bb86b86d60accef1 mrsh/include/shell/path.h -rw-r--r-- 389 bytes
1c6cbcf4emersion ci: add an optimized build 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