开发者

commands in .bash-profile do not work

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜