Lines Matching defs:hosts
58 (defcustom eshell-hosts-file "/etc/hosts"
59 "*The name of the /etc/hosts file."
60 :type '(choice (const :tag "No hosts file" nil) file)
135 "A cache the names of frequently accessed hosts.")
138 "A timestamp of when the hosts file was read.")
496 (defun eshell-read-hosts-file (filename)
497 "Read in the hosts from the /etc/hosts file."
498 (let (hosts)
500 (insert-file-contents eshell-hosts-file)
505 (add-to-list 'hosts (match-string 1)))
507 (add-to-list 'hosts (match-string 2)))
509 (add-to-list 'hosts (match-string 4)))))
510 (sort hosts 'string-lessp)))
512 (defun eshell-read-hosts (file result-var timestamp-var)
520 (set result-var (eshell-read-hosts-file file))
525 "Read the contents of /etc/hosts for host names."
526 (if eshell-hosts-file
527 (eshell-read-hosts eshell-hosts-file 'eshell-host-names