Reverse the candidates array (the list of positional arguments after options) with the --prepend (or -p) option so that directories are prepended to the path variable in the correct precedence. Add a "force" option as -f or --force that will skip checking if a directory exists and add the path even if it doesn't. As part of this change, add the check that the directory exists. |
||
---|---|---|
.. | ||
func |