appendpath — add a dir to a path environment variable then chain
appendpath
{var
} {dir
} {next-prog
}
appendpath is a chain-loading utility that appends the value dir
to the path environment variable var
, and then chain loads to next-prog
with the execvp(3) function.
If the environment variable is set and not empty, it inserts a colon (:
) between the old value of var
and the appended dir
.
next-prog
may contain its own command line options, which appendpath will ignore.