Anastasis
Anastasis

Reputation: 729

zsh: no matches found: push[dev1]

I am running a script like ./ci.sh push[dev1] and I get the response like zsh: no matches found: push[dev1]. I have tried to place alias into .zshrc but not jolly joy.

My .zshrc file:

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

Also the the task from the 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 });

and the file ci.sh contains:

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

Thanks for your help.

Upvotes: 0

Views: 2035

Answers (1)

Anastasis
Anastasis

Reputation: 729

Simply just escape the brackets

./ci.sh push\[dev1\]

Upvotes: 1

Related Questions