Shows useful information about how-to configure alias on a first run
    and configure automatically on a second.

    It'll be only visible when user type fuck and when alias isn't configured.
972671
def main():
    
    settings.init()
    configuration_details = shell.how_to_configure()
    if (
        configuration_details and
        configuration_details.can_configure_automatically
    ):
        if _is_already_configured(configuration_details):
            logs.already_configured(configuration_details)
            return
        elif _is_second_run():
            _configure(configuration_details)
            logs.configured_successfully(configuration_details)
            return
        else:
            _record_first_run()

    logs.how_to_configure_alias(configuration_details)
50300
public void addCacheConfiguration(final String alias, final CacheConfiguration<?, ?> config) {
    if (caches.put(alias, config) != null) {
      throw new IllegalStateException("Cache '" + alias + "' already present!");
    }
  }
364333
def create_alias(self):
        """"""
        LOG.info('Creating alias %s', self.env)

        try:
            self.lambda_client.create_alias(
                FunctionName=self.app_name,
                Name=self.env,
                FunctionVersion='$LATEST',
                Description='Alias for {}'.format(self.env))
        except boto3.exceptions.botocore.exceptions.ClientError as error:
            LOG.debug('Create alias error: %s', error)
            LOG.info("Alias creation failed. Retrying...")
            raise
902693
protected function createNewAlias() {
    $this->say("Installing <comment>blt</comment> alias...");
    $config_file = $this->getInspector()->getCliConfigFile();
    if (is_null($config_file)) {
      $this->logger->error("Could not install blt alias. No profile found. Tried ~/.zshrc, ~/.bashrc, ~/.bash_profile, ~/.profile, and ~/.functions.");
    }
    else {
      $canonical_alias = file_get_contents($this->getConfigValue('blt.root') . '/scripts/blt/alias');
      $result = $this->taskWriteToFile($config_file)
        ->text($canonical_alias)
        ->append(TRUE)
        ->setVerbosityThreshold(VerbosityThresholdInterface::VERBOSITY_VERBOSE)
        ->run();

      if (!$result->wasSuccessful()) {
        throw new BltException("Unable to install BLT alias.");
      }

      $this->say("<info>Added alias for blt to $config_file.</info>");
      $this->say("You may now use the <comment>blt</comment> command from anywhere within a BLT-generated repository.");
      $this->say("Restart your terminal session or run <comment>source $config_file</comment> to use the new command.");
    }
  }
625453
public static function configureAsRoot(): void
    {
        $filesystem = new Filesystem();
        $vendor_dir = Path::VENDOR_DIR . '/hostnet/phpcs-tool/src';
        if ($filesystem->exists($vendor_dir)) {
            return;
        }

        self::configure();

        $filesystem->mkdir($vendor_dir . '/Hostnet');
        $filesystem->symlink(__DIR__ . '/../../Sniffs', $vendor_dir . '/Hostnet/Sniffs');
        $filesystem->copy(__DIR__ . '/../../ruleset.xml', $vendor_dir . '/Hostnet/ruleset.xml');

        $filesystem->mkdir($vendor_dir . '/HostnetPaths');
        $filesystem->copy(__DIR__ . '/../../../HostnetPaths/ruleset.xml', $vendor_dir . '/HostnetPaths/ruleset.xml');
    }
650870
def handler_alias_exists(alias: str) -> bool:
        
        if SignalDispatcher.handlers.get(alias):
            return True

        return False
1165016
def alias(self, aliases, stats):
        
        login = email = None
        if stats is None:
            return
        # Attempt to use alias directly from the config section
        try:
            config = dict(Config().section(stats))
            try:
                email = config["email"]
            except KeyError:
                pass
            try:
                login = config["login"]
            except KeyError:
                pass
        except (ConfigFileError, NoSectionError):
            pass
        # Check for aliases specified in the email string
        if aliases is not None:
            try:
                aliases = dict([
                    re.split(r"\s*:\s*", definition, 1)
                    for definition in re.split(r"\s*;\s*", aliases.strip())])
            except ValueError:
                raise ConfigError(
                    "Invalid alias definition: '{0}'".format(aliases))
            if stats in aliases:
                if "@" in aliases[stats]:
                    email = aliases[stats]
                else:
                    login = aliases[stats]
        # Update login/email if alias detected
        if email is not None:
            self.email = email
            log.info("Using email alias '{0}' for '{1}'".format(email, stats))
            if login is None:
                login = email.split("@")[0]
        if login is not None:
            self.login = login
            log.info("Using login alias '{0}' for '{1}'".format(login, stats))
214102
public void setAlias(String alias)
	{
		m_alias = alias;
		String attributePath = (String)getAttribute();
		boolean allPathsAliased = true;
		m_userAlias = new UserAlias(alias, attributePath, allPathsAliased);
		
	}
153323
function Alias () {

  var home = process.env[(process.platform === 'win32') ? 'USERPROFILE' : 'HOME'],
      aliasFile = path.resolve(home + '/.pa/aliases.json');

  var writeAliases = function (aliases) {
    fs.writeFileSync(aliasFile, JSON.stringify(aliases, null, 2));
  };

  this.init = function () {
    if (!fs.existsSync(aliasFile)) {
      this.install();
    }
    this.aliases = require(aliasFile);
    return this;
  };

  this.install = function () {
    if (!fs.existsSync(path.resolve(home + '/.pa/'))) {
      fs.mkdirSync(path.resolve(home + '/.pa/'));
    }
    writeAliases(defaultAliases);
  };

  this.list = function () {
    var tmp, list = '';
    for (tmp in this.aliases) {
      list += '\n' + tmp + '=' + this.aliases[tmp];
    }
    return list.substr(1).green;
  };

  this.get = function (key) {
    var tmp;
    for (tmp in this.aliases) {
      if (this.aliases[tmp] === key) {
        return tmp.green;
      }
    }
    return ("no alias for '" + key + "'").red;
  };

  this.set = function (key, value) {
    this.aliases[key] = value;
    writeAliases(this.aliases);
    return ("set alias '" + key + "' for '" + value + "'").green;
  };

  this.trigger = function (argv) {
    if (typeof argv.alias !== 'string') {
      return this.list();
    }
    return argv._[0] ? this.set(argv._[0], argv.alias) : this.get(argv.alias);
  };

}
1144649
def set_alias(self, alias_hosted_zone_id, alias_dns_name):
        """"""
        self.alias_hosted_zone_id = alias_hosted_zone_id
        self.alias_dns_name = alias_dns_name
1323318
public static function setAlias()
    {
        $file = file_get_contents(self::$aliasFilePath);

        $newAliasString = str_replace(
            "'".self::$bowerVendor."'", 
            "'".self::$sourceBower."'", 
            self::$aliasBowerString
            );

        $file = str_replace(
            self::$aliasBowerString, 
            $newAliasString, 
            $file
            );

        $result = file_put_contents(self::$aliasFilePath, $file);

        if ($result) {
            
            echo "Install alias @bower done\n";
        }
    }
625270
def alias_feed(name, alias):
    """"""
    with Database("aliases") as db:
        if alias in db:
            print("Something has gone horribly wrong with your aliases! Try deleting the %s entry." % name)
            return
        else:
            db[alias] = name
508229
def configure(root_url, **kwargs):
    "
    default = kwargs.pop('default', True)
    kwargs['client_agent'] = 'example-client/' + __version__
    if 'headers' not in kwargs:
        kwargs['headers'] = {}
    kwargs['headers']['Accept-Type'] = 'application/json'
    if default:
        default_config.reset(root_url, **kwargs)
    else:
        Client.config = wac.Config(root_url, **kwargs)
110718
def set_alias(cls, domain, login, aliases):
        """"""
        return cls.call('domain.mailbox.alias.set', domain, login, aliases)
702766
protected function updateAlias() {
    $alias_info = $this->getAliasInfo();
    $new_contents = str_replace($alias_info['alias'], $alias_info['canonical_alias'], $alias_info['contents']);
    $bytes = file_put_contents($alias_info['config_file'], $new_contents);
    if (!$bytes) {
      throw new BltException("Could not update BLT alias in {$alias_info['config_file']}.");
    }

    $this->say("<info>The <comment>blt</comment> alias was updated in {$alias_info['config_file']}");
    $this->say("Execute <comment>source {$alias_info['config_file']}</comment> to update your terminal session.");
    $this->say("You may then execute <comment>blt</comment> commands.");
  }
1200201
public void alias( Object ...args ) {
        if( args.length % 2 == 1 )
            throw new RuntimeException("Even number of arguments expected");

        for (int i = 0; i < args.length; i += 2) {
            aliasGeneric( args[i], (String)args[i+1]);
        }
    }
830858
public static function setAlias($alias)
    {
        if (self::isConfigKeyExist($alias, 'shortcuts')) {
            $shortcuts = self::$config[$alias]['shortcuts'];
            //
            foreach ($shortcuts as $alias => $target) {
                $target = Strings::replace($target, '/', '\\');
                Alias::set($target, $alias);
            }
        }
    }