src/Robo/Commands/Blt/AliasCommand.php
public function installBltAlias() {
    if (isset($_SERVER['ComSpec'])) {
      $bltRoot = $this->getConfigValue('blt.root') . '\\vendor\\bin';
      $this->logger->error("Setting a blt alias is not supported in cmd.exe");
      $this->say("<info>Please use Windows to add <comment>$bltRoot</comment> to your Environment Variable PATH</info>");
      return;
    }
    if (!$this->getInspector()->isBltAliasInstalled()) {
      $config_file = $this->getInspector()->getCliConfigFile();
      if (is_null($config_file)) {
        $this->logger->warning("Could not find your CLI configuration file.");
        $this->logger->warning("Looked in ~/.zsh, ~/.bash_profile, ~/.bashrc, ~/.profile, and ~/.functions.");
        $created = $this->createBashProfile();
        $config_file = $this->getInspector()->getCliConfigFile();
        if (!$created || is_null($config_file)) {
          $this->logger->warning("Please create one of the aforementioned files, or create the BLT alias manually.");
          return;
        }
      }
      $this->say("BLT can automatically create a Bash alias to make it easier to run BLT tasks.");
      $this->say("This alias will be created in <comment>$config_file</comment>.");
      $confirm = $this->confirm("Install alias?");
      if ($confirm) {
        $this->createNewAlias();
      }
    }
    elseif (!$this->isBltAliasUpToDate()) {
      $this->logger->warning("Your BLT alias is out of date.");
      $confirm = $this->confirm("Would you like to update it?");
      if ($confirm) {
        $this->updateAlias();
      }
    }
    else {
      $this->say("<info>The BLT alias is already installed and up to date.</info>");
    }
  }
public function installBltAlias() {
    if (isset($_SERVER['ComSpec'])) {
      $bltRoot = $this->getConfigValue('blt.root') . '\\vendor\\bin';
      $this->logger->error("Setting a blt alias is not supported in cmd.exe");
      $this->say("<info>Please use Windows to add <comment>$bltRoot</comment> to your Environment Variable PATH</info>");
      return;
    }
    if (!$this->getInspector()->isBltAliasInstalled()) {
      $config_file = $this->getInspector()->getCliConfigFile();
      if (is_null($config_file)) {
        $this->logger->warning("Could not find your CLI configuration file.");
        $this->logger->warning("Looked in ~/.zsh, ~/.bash_profile, ~/.bashrc, ~/.profile, and ~/.functions.");
        $created = $this->createBashProfile();
        $config_file = $this->getInspector()->getCliConfigFile();
        if (!$created || is_null($config_file)) {
          $this->logger->warning("Please create one of the aforementioned files, or create the BLT alias manually.");
          return;
        }
      }
      $this->say("BLT can automatically create a Bash alias to make it easier to run BLT tasks.");
      $this->say("This alias will be created in <comment>$config_file</comment>.");
      $confirm = $this->confirm("Install alias?");
      if ($confirm) {
        $this->createNewAlias();
      }
    }
    elseif (!$this->isBltAliasUpToDate()) {
      $this->logger->warning("Your BLT alias is out of date.");
      $confirm = $this->confirm("Would you like to update it?");
      if ($confirm) {
        $this->updateAlias();
      }
    }
    else {
      $this->say("<info>The BLT alias is already installed and up to date.</info>");
    }
  }
public function installBltAlias ( ) { if ( isset ( $ _SERVER [ 'ComSpec' ] ) ) { $ bltRoot = $ this -> getConfigValue ( 'blt.root' ) . '\\vendor\\bin' ; $ this -> logger -> error ( "Setting a blt alias is not supported in cmd.exe" ) ; $ this -> say ( "<info>Please use Windows to add <comment>$bltRoot</comment> to your Environment Variable PATH</info>" ) ; return ; } if ( ! $ this -> getInspector ( ) -> isBltAliasInstalled ( ) ) { $ config_file = $ this -> getInspector ( ) -> getCliConfigFile ( ) ; if ( is_null ( $ config_file ) ) { $ this -> logger -> warning ( "Could not find your CLI configuration file." ) ; $ this -> logger -> warning ( "Looked in ~/.zsh, ~/.bash_profile, ~/.bashrc, ~/.profile, and ~/.functions." ) ; $ created = $ this -> createBashProfile ( ) ; $ config_file = $ this -> getInspector ( ) -> getCliConfigFile ( ) ; if ( ! $ created || is_null ( $ config_file ) ) { $ this -> logger -> warning ( "Please create one of the aforementioned files, or create the BLT alias manually." ) ; return ; } } $ this -> say ( "BLT can automatically create a Bash alias to make it easier to run BLT tasks." ) ; $ this -> say ( "This alias will be created in <comment>$config_file</comment>." ) ; $ confirm = $ this -> confirm ( "Install alias?" ) ; if ( $ confirm ) { $ this -> createNewAlias ( ) ; } } elseif ( ! $ this -> isBltAliasUpToDate ( ) ) { $ this -> logger -> warning ( "Your BLT alias is out of date." ) ; $ confirm = $ this -> confirm ( "Would you like to update it?" ) ; if ( $ confirm ) { $ this -> updateAlias ( ) ; } } else { $ this -> say ( "<info>The BLT alias is already installed and up to date.</info>" ) ; } }
Installs the BLT alias for command line usage.

@command blt:init:shell-alias

@aliases alias install-alias
Installs the BLT alias for command line usage .