;;;###autoload
(defun dig (domain &optional
query-type query-class query-option dig-option server)
- "Query addresses of a DOMAIN using dig, by calling `dig-invoke'.
-Optional arguments are passed to `dig-invoke'."
- (interactive "sHost: ")
+ "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))