def METHOD_NAME(self) -> None:
    """Lazy-initialize command-line when first entering command mode."""
    from vimiv.commands import history
    self._history = history.History(
        self.PREFIXES,
        max_items=api.settings.command.history_limit.value,
    )
    self.returnPressed.connect(self._on_return_pressed)
    self.textEdited.connect(self._on_text_edited)
    self.textChanged.connect(self._incremental_search)
    self.cursorPositionChanged.connect(self._on_cursor_position_changed)
    QCoreApplication.instance().aboutToQuit.connect(  # type: ignore[arg-type,union-attr,unused-ignore]
        self._history.write
    )
    styles.apply(self)