开发者

commands in .bash-profile do not work

开发者 https://www.devze.com 2023-01-25 00:11 出处:网络
I added an alias in my .bash_profile file in my home directory on Mac Leopard. For example, alias preview = \"open -a preview\"

I added an alias in my .bash_profile file in my home directory on Mac Leopard. For example,

alias preview = "open -a preview"
alias lsall = "ls -l"

When I try to run these commands from the command line, I get the message that command not foun开发者_高级运维d

Any idea what I might be doing wrong? Thanks!


You just need to lose the spaces around =, i.e.

alias preview="open -a preview"
alias lsall="ls -l"

You also need to name the file .bash_profile if you want it to be executed automatically when you start a new shell.

0

精彩评论

暂无评论...
验证码 换一张
取 消