2017-08-22 47 views
0

我正在运行一个脚本,如./ci.sh push[dev1],我得到的响应如zsh: no matches found: push[dev1]。我试图将别名放入.zshrc中,但不是愉快的喜悦。zsh:找不到匹配项:push [dev1]

我的.zshrc文件:

alias push='noglob push' 
alias git='noglob git' 
alias jake='noglob jake' 
alias task='noglob task' 
alias branch='noglob branch' 
alias gp='git push'` 

另外的任务从jakefile.js:

desc('Push commits to integration machine for validation.'); 
    task('push', ['status'], (branch) => { 
    if (!branch) { 
    console.log(
     'This command will push your code to the integration machine. Pass your\n' + 
     'branch name as a parameter (e.g., \'push[workstation_name]\').\n' 
    ); 
    fail('No branch provided'); 
    } 
    run([ 
    'git push origin ' + branch 
    ],() => { 
    console.log('\nOK. Current branch has been copied to integration machine.'); 
    complete(); 
    }); 
}, { async: true }); 

和文件ci.sh包含:

#!/bin/sh 
. build/scripts/run_jake.sh -f build/scripts/ci.jakefile.js $* 

感谢您的帮助。

回答

0

只是简单地逃避括号

./ci.sh push\[dev1\]