Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个指向某个程序的符号链接:git-receive-pack -> git. 我想用 bash 脚本替换符号链接,然后git像在替换之前从符号链接中调用它一样调用。我试图将其称为 asgit $*但它将第一个参数视为 asgit而不是 as git-receive-pack。如何正确调用它?
git-receive-pack -> git
git
git $*
git-receive-pack
我会git-receive-pack单独留下符号链接,而是创建一个 bash 函数(in ~/.bashrc)。这样的事情应该可以解决问题:
~/.bashrc
function git-receive-pack() { ... (do your stuff) command git-receive-pack $* }