Reputation: 109
So, I have created a bash_profile and set the aliases, but they just work in my home folder (cd/). Is there a way where I can use this aliases whenever I am in? I am using the Bash in MAC OS X.
Thanks brothers.
EDIT:
It appears these aliases are for cd commands to folders in the home folder or for scripts in the home folder. For example:
alias jobs2015='cd Documents/erickjones/_Aotopo/_jobs/2015
Upvotes: 1
Views: 1028
Reputation: 8819
I presume your aliases are either for cd
commands to folders in your home folder or to run scripts that are in your home folder.
Your options are:
$HOME/
when you define the aliases.HOME
folder (or other folder where your scripts are) in the PATH.cd
, include the HOME
folder in the CDPATH
variable.PATH
is the list of folders that are searched to find a command that you are executed. YOu can add directories to it, but be careful not to delete existing ones. See here: PATH
CDPATH
is a list of folders where cd will look for the folder to search. See here CDPATH
Upvotes: 1