The only difference to `kill-line' is that it will kill the whole input
when at the end of the minibuffer. In that case, the regular `kill-line'
was extending into the second line of the minibuffer, which is
unacceptable.
(define-key map (kbd "M-j") 'ivy-yank-word)
(define-key map (kbd "M-i") 'ivy-insert-current)
(define-key map (kbd "C-o") 'hydra-ivy/body)
+ (define-key map (kbd "C-k") 'ivy-kill-line)
map)
"Keymap used in the minibuffer.")
(autoload 'hydra-ivy/body "ivy-hydra" "" t)
(unless (= (point) (line-end-position))
(kill-word arg)))
+(defun ivy-kill-line ()
+ "Forward to `kill-line'."
+ (interactive)
+ (if (eolp)
+ (kill-region (minibuffer-prompt-end) (point))
+ (kill-line)))
+
(defun ivy-backward-kill-word ()
"Forward to `backward-kill-word'."
(interactive)