public function setCompleter(callable $completer)
    {
        if (!Readline::isFullySupported()) {
            throw new \LogicException(sprintf('%s requires readline support to use the completer.', __CLASS__));
        }

        $this->completer = $completer;
        return $this;
    }