I have a custom command called git-feature, which is located in a Unix executable file with the same name. I'm trying to configure the $PATH variable in ~/.bash_profile so that it recognizes the Unix file. I updated the PATH variable to include the file's path:
export PATH=$PATH:~/Applications/MAMP/htdocs/code/git-shortcuts/ The echo $PATH command in my bash terminal produces the following result:
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/myname/Applications/MAMP/htdocs/code/git-shortcuts/ But trying to call git-feature leads to the following error:
-bash: git-feature: command not found There are a few similar questions on S.O., but none of the ones I found solved this specific type of issue. Do I need to change the PATH variable differently in order for my custom command to be recognized by bash?
chmod +x git-feature?/Users/myname/Applications/MAMP/htdocs/code/git-shortcuts/git-feature? Is it found and executable? If not, then you've got the wrong directory on your path. If so, there isn't an obvious reason why it would fail.which git-featureprints~/Applications/MAMP/htdocs/code/git-shortcuts/git-featureor do you see/usr/bin/which: no somep in (path..... )??