anchor.diff:           - error-color: Prompt error color.
   
      Returns: the entered number"
  -  (prompt msg 
  -	  :parser #'parse-integer
  -	  :validator (or (and validator (clavier:&& (clavier:is-an-integer)
  -						    (make-validator validator)))
  -			 (clavier:is-an-integer))
  -	  :default default
  -	  :required-p required-p
  -	  :if-invalid (or (parse-if-invalid if-invalid)
  -			  (lambda (&rest args)
  -			    (declare (ignore args))
  -			    (say "Error: Not a number" :color error-color)))
  -	  :color color
  -	  :error-color error-color))
  -
  -(defun prompt-email (&optional msg &key default 
  -				     (required-p t)
  -				     validator
  -				     if-invalid
  -				     (color *prompt-color*)
  -				     (error-color *prompt-error-color*))
  +  (prompt msg
  +          :parser #'parse-integer
  +          :validator (or (and validator (clavier:&& (clavier:is-an-integer)
  +                                                    (make-validator validator)))
  +                         (clavier:is-an-integer))
  +          :default default
  +          :required-p required-p
  +          :if-invalid (or (parse-if-invalid if-invalid)
  +                          (lambda (&rest args)
  +                            (declare (ignore args))
  +                            (say "Error: Not a number" :color error-color)))
  +          :color color
  +          :error-color error-color))
  +
  +(defun prompt-email (&optional msg &key default
  +                                     (required-p t)
  +                                     validator
  +                                     if-invalid
  +                                     (color *prompt-color*)
  +                                     (error-color *prompt-error-color*))
     "Prompts for an email.
   
      Args: - msg: The prompt.
  
positive.code:          - color: Color to use at prompt. Default: *prompt-color*
           - error-color: Color to use when error ocurrs. Default: *prompt-error-color*
  
    Example: 
  
    ``(choose-many \"Choose: \" (list \"foo\" \"bar\" \"baz\") :default '(\"baz\"))``
  
    Tags: menu, choose"
    (assert (every (lambda (option) (member option options :test 'string=)) default)
  	  nil "Invalid default: ~s" default)
    (let ((chosen-options nil))
      (flet ((print-options ()
  	     (loop 
  		for option in options
  		for i from 0 
  		do
  		  (format t "[~A] ~A" i option)
  		  (when (< (1+ i) (length options))
  		    (format t separator)))
  	     (terpri)
  	     (say "Chosen options: ~{~A~^, ~}" (reverse chosen-options)))
  	   (read-option ()
  	     (cond 
  	       ((or complete completer)
  		(let ((prompt (if color 
  				  (with-output-to-string (s)
  				    (cl-ansi-text:with-color (color :stream s)
  				      (format s "~A~@[[~A]~]" msg default)))
  				  (format nil "~A~@[[~A]~]" msg default))))
  		  (complete-prompt prompt options completer)))
  	       (t
  		(say msg :color color)
  		(when default
  		  (say "[~A] " default :color color))
  		(string-trim (list #\ ) (read-line))))))
        (when print-options
  	(print-options))
        (let* ((chosen-option (read-option))
  	     (option-number (ignore-errors (parse-integer chosen-option))))
  	(loop 
  	   do 
  	     (cond ((equalp chosen-option "")
  		    (if chosen-options
  			(return (reverse chosen-options))
  			(return default)))
  		   ((find chosen-option (mapcar #'princ-to-string options) :test #'string=)
  		    (pushnew (find chosen-option (mapcar #'princ-to-string options) :test #'string=) chosen-options :test test)
  		    (when print-options
  		      (print-options)))
  		   ((and option-number
  			 (>= option-number 0)
  			 (< option-number (length options)))
  		    ;; Correct option
  		    (pushnew (nth option-number options) chosen-options :test test)
  		    (when print-options
  		      (print-options)))
  		   (t
  		    ;; Incorrect option
  		    (progn
  		      (if if-wrong-option
  			  (funcall if-wrong-option)
  			  (say "Wrong option." :color error-color))
  		      (when print-options
  			(print-options)))))
  	     (setf chosen-option (read-option))
  	     (setf option-number (ignore-errors (parse-integer chosen-option))))))))
  
  (defmacro while (msg (&rest options) &body body)
    "Asks to repeat a task several times and collects its result.
  
negative.code:          - error-color: Prompt error color."
    (check-type default boolean)
    (labels ((format-boolean (boolean)
               (if boolean "yes" "no"))
             (ask-question ()
               (say msg :color color)
               (when default-p
                 (say "[~A] " (format-boolean default) :color color))
               (string-trim (list #\ ) (read-line))))
      (let ((answer (ask-question)))
        (loop
          do
             (cond
               ((and (equalp answer "") default-p)
                (return-from ask default))
               ((member answer (list "yes" "y" "on" "true") :test #'string-equal)
                (return-from ask t))
               ((member answer (list "no" "n" "off" "false") :test #'string-equal)
                (return-from ask nil))
               (t
                (if if-wrong-answer
                    (funcall if-wrong-answer)
                    (say "Answer yes or no" :color error-color))
                (setf answer (ask-question))))))))
  
  (defun prompt (&optional msg &key
                                 default
                                 (required-p t)
                                 validator
                                 if-invalid
                                 parser
                                 completer
                                 (color *prompt-color*)
                                 (error-color *prompt-error-color*))
    "Prompt for a string.
  
     Args: - msg: The prompt.
  