#!/bin/bash
echo ${2:-"-l -p"}
Having some bash parameter-substitution fun and (Neo) Vim complains about it, while the code is perfectly fine.
I know I can suppress errors totally by doing sort of like hi Error ctermbg=None
, but that's quick and dirty. (I can live with the red background, but it's ugly).
I did :h error
[[ press Tab 20 times ]], but didn't find anything interesting about the topic.
Can I fix (or should I report) such misbehaviour?
Pure Vim highlights the same way, running:
vim -u NONE -c "set nocp | set filetype=sh | syn on"
vim --version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Nov 15 2016 18:06:04)
Included patches: 1-86
Compiled by Arch Linux
Huge version without GUI.
Update
Doesn't work in urxvt. Neither in neo nor pure Vim.
Doesn't work in NeoVim. Neither in urxvt nor xterm.
Works only in xterm, pure Vim.
works == no red background, I mean
All of the above happens with -u NONE
.