zsh:找不到匹配项:push [dev1]

时间:2017-08-22 13:32:54

标签: terminal zsh jake

我正在运行像./ci.sh push[dev1]这样的脚本,我得到的响应就像zsh: no matches found: push[dev1]一样。我试图将别名放入.zshrc,但不是快乐。

我的.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 $*

感谢您的帮助。

1 个答案:

答案 0 :(得分:0)

只需转义括号

即可

./ci.sh push\[dev1\]