2

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 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 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". – Dennis Williamson Jul 2 at 12:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.