head is a common Unix/Linux executable, but it's not listed in the shell syntax highlighting configuration.

In contrast, many common executables are. Specifically, its counterpart, tail, is listed. As are some not uncommon, but not fundamental executables like less and rpm.

It's also interesting that the lists differ between the syn keyword bashStatement, kshStatement and shStatement sections in the Misc "fold" for executables even when they are independent from the shell. For example, cat is only listed in the ksh section.

What is the reason head is omitted? Why are there these other discrepancies?

  • Personally I find the entire list a bit insane (both the bash and ksh ones), but it's been the case for at least 15 years: github.com/vim/vim/blame/…
    – muru
    Jul 2, 2019 at 6:53
  • I would be inclined to close this question as primarily opinion based: The fact is that this syntax file has been like this for 15 years and I don't see how someone could answer why Braam decided to keep these items and not some other. However @Dennis if you really are not satisfied with this file you can still open a PR maybe Braam will accept it or at least give a good reason for why he choose not to include head.
    – statox
    Jul 2, 2019 at 11:49
  • I think these two comments come close to qualifying as an answer. As would a hypothetical "here's a third-party file that fixes all-the-things". Jul 2, 2019 at 12:38
  • I suppose one could just ask the syntax/sh.vim maintainer...not Braam but the "vim famous" Dr. Chip. BTW, our very own @ChristianBrabandt maintains syntax/zsh.vim and indent/sh.vim...being involved with those he might run in the same social circles as doc chip or otherwise have gained some insight into the matter. :)
    – B Layer
    Sep 1, 2019 at 2:47
  • "Bug" fixed. Jun 29, 2022 at 21:43


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.