Function: projectile--command-history-insert

projectile--command-history-insert is a byte-compiled function defined in projectile.el.

Signature

(projectile--command-history-insert HISTORY COMMAND)

Documentation

Insert COMMAND into the ring HISTORY.

Duplicates are handled according to projectile-command-history-ignore-duplicates.

Source Code

;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defun projectile--command-history-insert (history command)
  "Insert COMMAND into the ring HISTORY.
Duplicates are handled according to
`projectile-command-history-ignore-duplicates'."
  (cond
   ((eq projectile-command-history-ignore-duplicates t)
    (unless (string= (car-safe (ring-elements history)) command)
      (ring-insert history command)))
   ((eq projectile-command-history-ignore-duplicates 'erase)
    (let ((idx (ring-member history command)))
      (while idx
        (ring-remove history idx)
        (setq idx (ring-member history command))))
    (ring-insert history command))
   (t (ring-insert history command))))