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:
- prefix command or cd-directories
$home/
when define aliases. - for commands, include
home
folder (or other folder scripts are) in path. - for
cd
, includehome
folder incdpath
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
Post a Comment