~emersion/mrsh

ref: 4da12aae651dac2f0c6818f54d5d8b5f0a9e8bf6 mrsh/include/shell/path.h -rw-r--r-- 391 bytes
4da12aaeDrew DeVault Implement 'shift' builtin 3 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