Remove the command name from the arguments, if a command name is actually set.

@return $this;
342299
public function enableCommandName()
    {
        if (!$this->commandNameEnabled
            && $this->commandName
            && isset($this->arguments[0])
            && $this->arguments[0] === $this->commandName
        ) {
            unset($this->arguments[0]);
            $this->arguments = array_values($this->arguments);
        }
        $this->commandNameEnabled = true;
        return $this;
    }
1302243
public function unregisterInstance()
    {
        if (array_key_exists($this->instanceName, self::$instances)) {
            unset(self::$instances[$this->instanceName]);
            unset($this->instanceName);
        }
        return $this;
    }
552328
protected function findCommand(): void
    {
        if (!isset($this->args[0])) {
            return;
        }

        $newArgs = [];

        foreach ($this->args as $key => $value) {
            if ($key === 0) {
                $this->command = \trim($value);
            } elseif (\is_int($key)) {
                $newArgs[] = $value;
            } else {
                $newArgs[$key] = $value;
            }
        }

        $this->args = $newArgs;
    }
1028847
public function unsetInstanceOptions()
    {
        foreach (Core\Config::getDefaults() as $k => $v) {
            if (isset($this->$k)) {
                unset($this->$k);
            }
        }

        return $this;
    }
937618
public function remove()
    {

        $removed = 0;
        foreach( func_get_args() as $arg ){

            // is this a container?
            if( $arg instanceof Container ) {

                $originalCount = $this->count();
                $this->collection = array_diff_key( $this->collection, $arg->collection );
                $removed += ( $originalCount - $this->count() );

            } else {

                // use array search
                $search = $this->search( $arg, true );

                foreach( $search as $value ){
                    if( $value !== false ){
                        $removed++;
                        $this->offsetUnset( $value );
                    }
                }

            }

        }
        $this->rewind();
        return $removed;

    }
1175142
public function removeArguments(array $arguments = null)
  {
    $this->arguments = array();

    if ($arguments) {
      $this->addArguments($arguments);
    }

    return $this;
  }
126410
public function delete() {

		if(false !== $this -> directory -> getExists()) {

			if(rmdir($this -> directory -> getBasepath())) {
				$this -> refresh();
			}
		}

		return $this;
	}
905866
public function clearFlags() {
		$remove = [];
		$classPrefix = 'oo-ui-flaggedElement-';

		foreach ( $this->flags as $flag ) {
			$remove[] = $classPrefix . $flag;
		}

		$this->flagged->removeClasses( $remove );
		$this->flags = [];

		return $this;
	}
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;
    }
1145309
public function setName($name)
    {
        if (null !== $name) {
            Assert::string($name, 'The command name must be a string or null. Got: %s');
            Assert::notEmpty($name, 'The command name must not be empty.');
            Assert::greaterThan(strlen($name), 1, sprintf('The command name should contain at least two characters. Got: "%s"', $name));
        }

        parent::setName($name);

        return $this;
    }
129056
public function remove()
    {
        if ($this->isRegistered()) {
            $this->unRegister();
        }

        $path = getLocalPath('modules/' . $this->getName());

        if ($path) {
            (new Filesystem())->remove($_SERVER['DOCUMENT_ROOT'] . $path);
        }

        unset($this->object);

        return $this;
    }
976478
def remove(self, name, **params):
        
        log = self._getparam('log', self._discard, **params)

        if name not in self.names:
            log.error("Attempt to remove %r which was never added", name)
            raise Exception("Command %r has never been added" % (name,))
        del self.names[name]
        rebuild = False
        for path in list(self.modules):
            if name in self.modules[path]:
                self.modules[path].remove(name)
            if len(self.modules[path]) == 0:
                del self.modules[path]
                rebuild = True
        if rebuild:
            self._build(name, **params)
873828
public function required()
    {
        if (!array_key_exists($this->key, $this->command->arguments)) {
            throw new \Hail\Image\Exception\InvalidArgumentException(
                sprintf('Missing argument %d for %s', $this->key + 1, $this->getCommandName())
            );
        }

        return $this;
    }
328490
def remove_argument(self, name):
        
        for index, arg in enumerate(self.args[:]):
            if name == arg.name:
                del self.args[index]
                break
        return self
1064683
public function clear()
    {
        $keys = array_keys($this->values);
        foreach ($keys as $key)
            unset($this->values[$key]);
        return $this;
    }
1303198
public function clearOptions()
    {
        $properties     = $this->getProperties();
        $properties['optionsPath']  = [];
        $properties['optionsTree']['left']  = [];
        $properties['optionsTree']['right']  = [];
        $this->setProperties($properties);
        return $this;
    }
84401
public function remove() {
		$this->rm('auth');
		if ($PHPHg = $this->get('PHPHg'))
			$this->set(array('auth' => $PHPHg));
		$this->rm('PHPHg')->save();
		return $this;
    }