0
我有我的hg
(水银)命令一个bash别名,看起来像这样:巴什 - 传递参数相同的方式,他们收到
hg() {
if [[ $1 == 'up' ]]; then
if [[ $# == 2 ]]; then
_update_bookmark $2
else
up
fi
else
/bin/hg [email protected]
fi
}
我的问题是与最终else
情况。我想要的论据,因为我收到他们在hg()
,以完全相同的方式通过/bin/hg
。我的问题出现在我做类似hg commit -m "my message here"
之类的事情时,它就像/bin/hg commit -m my message here
一样被传递。我尝试了[email protected]
和$*
- 不确定哪个更合适,但似乎都没有办法。有什么建议么?
此外请确保您报价'“$ 2” –