Function: pcomplete/ack

pcomplete/ack is an autoloaded and byte-compiled function defined in pcmpl-x.el.gz.

Signature

(pcomplete/ack)

Documentation

Completion for the ack command.

Start an argument with - to complete short options and -- for long options.

Aliases

pcomplete/ack-grep

Source Code

;; Defined in /usr/src/emacs/lisp/pcmpl-x.el.gz
;;;###autoload
(defun pcomplete/ack ()
  "Completion for the `ack' command.
Start an argument with `-' to complete short options and `--' for
long options."
  ;; No space after =
  (while t
    (if (pcomplete-match "^-" 0)
        (cond
         ((pcomplete-match "^--color-\\w+=\\(\\S-*\\)" 0)
          (pcomplete-here* pcmpl-x-ack-color-options
                           (pcomplete-match-string 1 0) t))
         ((pcomplete-match "^--\\(?:no\\)?ignore-dir=\\(\\S-*\\)" 0)
          (pcomplete-here* (pcomplete-dirs)
                           (pcomplete-match-string 1 0) t))
         ((pcomplete-match "^--type=\\(\\S-*\\)" 0)
          (pcomplete-here* (mapcar (lambda (type-option)
                                     (substring type-option 2))
                                   (pcmpl-x-ack-type-options))
                           (pcomplete-match-string 1 0) t))
         ((pcomplete-match "^--" 0)
          (pcomplete-here* (append (pcmpl-x-ack-long-options)
                                   (pcmpl-x-ack-type-options))))
         (t (pcomplete-opt (pcmpl-x-ack-short-options))))
      (pcomplete-here* (pcomplete-dirs-or-entries)))))