pathmod - Run command with a modified PATH



NAME

pathmod - Run command with a modified PATH


SYNOPSIS

pathmod [OPTIONS] [--] COMMAND [ARGS]


DESCRIPTION


OPTIONS

-d, --direct

Lookup only COMMAND according to the modified PATH. Command calls by COMMAND and its children still inherits PATH environment variable from pathmod(1)'s caller. Unless of course COMMAND changes it on its own.

If neither -d nor -s is given, the default mode is -d.

-s, --subsequent

Modify PATH environment for COMMAND, so COMMAND is still looked up according to the same PATH as pathmod(1), but its children are going to be looked up according to the modified path.

-d -s

Simultaneous --direct and --subsequent is supported. In this case COMMAND is looked up according to the modified PATH and the PATH environment is changed too. This is nearly the same as env PATH=MOD_PATH COMMAND ARGS.

-r, --remove DIR

Remove DIR directory from the PATH. Note, items in PATH are normalized first. Normalization rules:

--remove-regex PATTERN
-a, --append DIR
-p, --prepend DIR
-i, --insert-before PATTERN:DIR

Insert DIR before each item in the PATH which matches to PATTERN regexp.

empty item is the self (. "dot") directory
remove trailing slash


LIMITATIONS


SEE ALSO

 pathmod - Run command with a modified PATH