osx - How can I set an alias for a command in bash that works in any folder? -


so, have created bash_profile , set aliases, work in home folder (cd/). there way can use aliases whenever in? using bash in mac os x.

thanks brothers.

edit:

it appears these aliases cd commands folders in home folder or scripts in home folder. example:

alias jobs2015='cd documents/erickjones/_aotopo/_jobs/2015 

i presume aliases either cd commands folders in home folder or run scripts in home folder.

your options are:

  1. prefix command or cd-directories $home/ when define aliases.
  2. for commands, include home folder (or other folder scripts are) in path.
  3. for cd, include home folder in cdpath variable.

path list of folders searched find command executed. can add directories it, careful not delete existing ones. see here: path

cdpath list of folders cd folder search. see here cdpath


Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - Chrome Extension: Interacting with iframe embedded within popup -