esh-help icon indicating copy to clipboard operation
esh-help copied to clipboard

`eldoc': don't error if a command has no SYNOPSIS

Open nbfalcon opened this issue 4 years ago • 3 comments

esh-help-eldoc-man-minibuffer-string searches for a "SYNOPSIS" line and then transforms the string following it. This causes an error if the command has no synopsis (e.g. ninja). Use -some->> instead of ->>, fixing the error.

nbfalcon avatar Nov 30 '20 13:11 nbfalcon

@hlissner you should bump esh-help if/when this gets merged.

nbfalcon avatar Nov 30 '20 13:11 nbfalcon

To reproduce: 0. M-x toggle-debug-on-error

  1. apt-install ninja-build (needed for the man pages to be available)
  2. Open an eshell
  3. Type ninja and start typing arguments (e.g. -C)
  4. Observe that an error is thrown, because ninja's man page has no synopsis

Everything still works with other commands (e.g. gcc).

nbfalcon avatar Nov 30 '20 13:11 nbfalcon

@tom-tan anything blocking a merge of this PR? Hitting a similar issue as the PR author

ethan-leba avatar Apr 26 '22 19:04 ethan-leba