Show the default in the prompt when prompting for token creation.
authorTed Zlatanov <tzz@lifelogs.com>
Sun, 13 Mar 2011 14:00:37 +0000 (09:00 -0500)
committerTed Zlatanov <tzz@lifelogs.com>
Sun, 13 Mar 2011 14:00:37 +0000 (09:00 -0500)
* auth-source.el (auth-source-netrc-create): Show the default in the
prompt when prompting for token creation.

lisp/ChangeLog
lisp/auth-source.el

index 74fbc6b..9af5af4 100644 (file)
@@ -1,3 +1,8 @@
+2011-03-13  Teodor Zlatanov  <tzz@lifelogs.com>
+
+       * auth-source.el (auth-source-netrc-create): Show the default in the
+       prompt when prompting for token creation.
+
 2011-03-12  Teodor Zlatanov  <tzz@lifelogs.com>
 
        * auth-source.el (auth-source-format-prompt): Always convert the value
index d82e082..dd1b83d 100644 (file)
@@ -1110,6 +1110,10 @@ See `auth-source-search' for details on SPEC."
                 ;; special case prompt for passwords
                 (read-passwd prompt))
                ((null data)
+                (when default
+                  (setq
+                   prompt
+                   (concat prompt (format "(default %s) " default))))
                 (read-string prompt nil nil default))
                (t (or data default))))