Unregisters a sub-command.

@param string $command The command name.
435298
public function unregisterSubCommand($command)
    {
        if (! array_key_exists($command, $this->subCommands)) {
            throw new \Exception("A sub-command with the name {$command} does not exist.");
        }

        unset($this->subCommands[$command]);
    }
1366159
private static function isCommandAvailable(string $command): bool
    {
        if (!is_callable('shell_exec') || stripos(ini_get('disable_functions'), 'shell_exec') !== false) {
            return false;
        }

        $result = null;
        if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
            $result = @shell_exec('which '.$command);
        }

        return !empty($result);
    }
85890
public void clearCommand(Command command) {
		List controls = getControlsFor(command);
		
		for (int i=0;i<controls.size();i++) {
	    	unbindCommand((Control) controls.get(i));
	    }
	}
1297792
public function unregister($name)
    {
        unset($this->handlers[$name]);

        if ($name === $this->selectedHandler) {
            reset($this->handlers);
            $this->selectedHandler = key($this->handlers);
        }
    }
153382
protected function registerCommands(array $commands)
    {
        foreach (array_keys($commands) as $command) {
            call_user_func_array([$this, "register{$command}Command"], []);
        }

        $this->commands(array_values($commands));
    }
669096
public function destroy(string $key): void
    {
        $key = $this->getKey($key);

        cache()->forget($key);
    }
742833
public function publish(Command $command)
    {
        $index = array_search($command, $this->commands);

        // remove exists command and publish it again
        if ($index !== false) {
            unset($this->commands[$index]);
        }

        $this->commands[] = $command;

        return true;
    }
50084
protected function registerMakeSeederCommand($command)
    {
        $this->app->singleton($command, function ($app) {
            return new Database\Commands\SeederMakeCommand($app);
        });
    }
778081
public function isNativeCommandAvailable($command)
    {
        switch ($command) {
            case 'zip':
            case 'unzip':
                break;
            default:
                return false;
        }
        if (!isset($this->availableNativeCommands[$command])) {
            $this->availableNativeCommands[$command] = false;
            if ($this->functionInspector->functionAvailable('exec')) {
                $rc = 1;
                $output = [];
                @exec($command . ' -v 2>&1', $output, $rc);
                if ($rc === 0) {
                    $stdOut = implode("\n", $output);
                    if (stripos($stdOut, 'info-zip') !== false || stripos($stdOut, 'infozip') !== false) {
                        $this->availableNativeCommands[$command] = true;
                    }
                }
            }
        }

        return $this->availableNativeCommands[$command];
    }
457978
protected function registerAddonRemoveCommand($command)
    {
        $this->app->singleton($command, function ($app) {
            return new Addons\Commands\AddonRemoveCommand($app);
        });
    }
128056
protected function registerMakeCommandCommand($command)
    {
        $this->app->singleton($command, function ($app) {
            return new Generators\Commands\CommandMakeCommand($app);
        });
    }
502941
public function remove($key = NULL)
    {
        $this->executeRemoveCommand();

        if( $key === NULL )
        {
            unlink($this->crontabCommands);
        }
        else
        {
            $this->removeJobFromExecFile($key);

            $this->executeCommand();
        }
    }
1259719
public function removeCommandCallback($command, $method)
    {
        $command = strtolower($command);

        if (isset($this->__command_callbacks[$command]) )
        {
            if($method instanceof \Closure) {
                $index = spl_object_hash($method);
            } else {
                $index = $method;
            }

            unset($this->__command_callbacks[$command][$index]);
        }

        return $this;
    }
236710
protected function registerRouteCommand($command)
    {
        $this->app->singleton($command, function ($app) {
            return new Commands\RouteListCommand($app);
        });
    }
507074
public function toCommandHandler($command)
    {
        $commandClass = get_class($command);
        $handler = substr_replace($commandClass, 'CommandHandler', strrpos($commandClass, 'Command'));

        if ( ! class_exists($handler))
        {
            $message = "Command handler [$handler] does not exist.";

            throw new HandlerNotRegisteredException($message);
        }

        return $handler;
    }
692019
protected function registerMakeAddonCommand($command)
    {
        $this->app->singleton($command, function ($app) {
            return new Addons\Commands\AddonMakeCommand($app);
        });
    }
947536
public function handle(RemoveComponentCommand $command)
    {
        $component = $command->component;

        event(new ComponentWasRemovedEvent($this->auth->user(), $component));

        $component->delete();
    }