  
 ;;; govc process helpers
-(defvar govc-urls nil
+(defcustom govc-urls nil
   "List of URLs for use with `govc-session'.
 The `govc-session-name' displayed by `govc-mode-line' uses `url-target' (anchor)
 if set, otherwise `url-host' is used.

    (let ((u (completing-read "govc url: " (-map 'car alist))))
      (cdr (assoc u alist)))))

(defun govc-session-set-url (url)
  "Set `govc-session-url' to URL and optionally set other govc-session-* variables via URL query."
  (let ((q (cdr (url-path-and-query (govc-url-parse url)))))
    (dolist (opt (if q (url-parse-query-string q)))
      (let ((var (intern (concat "govc-session-" (car opt)))))


  `\\[universal-argument] \\[govc-vm]'

To avoid putting your credentials in a variable, you can use the
auth-source search integration.

```
  (setq govc-urls '(\"myserver-vmware-2\"))
```

And then put this line in your `auth-sources' (e.g. `~/.authinfo.gpg'):
```
    machine myserver-vmware-2 login tzz password mypass url \"myserver-vmware-2.some.domain.here:443?insecure=true\"
```

Which will result in the URL \"tzz:mypass@myserver-vmware-2.some.domain.here:443?insecure=true\".
For more details on `auth-sources', see Info node `(auth) Help for users'.

When in `govc-vm' or `govc-host' mode, a default URL is composed with the
current session credentials and the IP address of the current vm/host and
the vm/host name as the session name.  This makes it easier to connect to
nested ESX/vCenter VMs or directly to an ESX host."
  :group 'govc
  :type '(repeat (string :tag "vcenter URL or auth-source machine reference")))

(defvar-local govc-session-url nil
  "ESX or vCenter URL set by `govc-session' via `govc-urls' selection.")
