bashrc惰性替换
如何在运行时而不是在执行〜/ .bashrc时(打开终端时)获得~/.bashrc别名来评估$()替换? 我经常运行此命令,以便为其添加别名: svn diff -r $(svn info | grep ^Revision | awk {'print $2'}):HEAD $(svn info | grep ^URL | awk {'print $2'}) | colordiff 但是,当我将其添加~/.bashrc为别名时,我看到评估被硬编码为它们在打开终端时所具有的值: $ alias alias svnbranch='svn diff -r 178184:HEAD svn+ssh://branches/t4252 | colordiff' 如果我在其中打开终端,~则会收到错误消息: svn: E155007: '/home/dotancohen' is not a working copy svn: E155007: '/home/dotancohen' is …