Eshell-Eldoc is eldoc-mode
support for eshell
.
NOTE: I no longer use nor develop this library; I recommend esh-help instead, as it is available from MELPA and has all of the features of this library and more.
Eshell-Eldoc first checks for elisp functions named by eshell’s input and uses Emacs’ built in eldoc functionality to display documentation if one is found.
If no elisp or eshell function with the name is found, the whatis(1)
command is used to get a description of a shell command of the input text. Caching is built in to the whatis lookup, so slowdown should be minimal for repeatedly-typed inputs.
Available via MELPA soon!
Once it is, simply install it, and then evaluate and add the following to your init file:
(add-hook 'eshell-mode-hook 'eshell-eldoc-enable-for-buffer)
Note that for whatis
to actually return results, you may need to run the mandb
command as root to regenerate the manpage index.
You may need to run this command again if a newly-installed program isn’t being picked up. And since eshell-eldoc
caches the results from whatis
(including empty results), you may also need to clear the cache with the eshell-eldoc-clear-cache
command, or restart Emacs.
- It would be nice if it were possible to make this package automatically enable itself (i.e. without requiring the user to use
add-hook
). I’m not sure if this is possible.
- esh-help - provides similar eldoc support for eshell and external, but gives the “SYNOPSIS” from a command’s manpage instead of the summary from
whatis
. - emacs-fish-completion - for Fish shell-like command completion in eshell.