Function: dig

dig is an autoloaded, interactive and byte-compiled function defined in dig.el.gz.

Signature

(dig DOMAIN &optional QUERY-TYPE QUERY-CLASS QUERY-OPTION DIG-OPTION SERVER)

Documentation

Query addresses of a DOMAIN using dig.

See dig-invoke for an explanation for the parameters. When called interactively, DOMAIN is prompted for. If given a prefix, also prompt for the QUERY-TYPE parameter.

Probably introduced at or before Emacs version 28.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/net/dig.el.gz
;;;###autoload
(defun dig (domain &optional
		   query-type query-class query-option dig-option server)
  "Query addresses of a DOMAIN using dig.
See `dig-invoke' for an explanation for the parameters.
When called interactively, DOMAIN is prompted for.  If given a prefix,
also prompt for the QUERY-TYPE parameter."
  (interactive
   (list (read-string "Host: ")
         (and current-prefix-arg
              (read-string "Query type: "))))
  (pop-to-buffer-same-window
   (dig-invoke domain query-type query-class query-option dig-option server))
  (goto-char (point-min))
  (and (search-forward ";; ANSWER SECTION:" nil t)
       (forward-line))
  (dig-mode))