'main': In command position, do not highlight directories (unless AUTO_CD is set) and non-executable files.

Fixes #202.

Test expectations are updated.  For example, BUFFER='/bin' is now
highlighted as path_prefix because it's a prefix of '/bin/sh' which
would be valid.  However, BUFFER='/bin;' is now properly highlighted
as an error (unless AUTO_CD is set).
This commit is contained in:
Daniel Shahaf
2020-01-12 20:06:13 +00:00
committed by Daniel Shahaf
parent a6eb966d96
commit 5545fb9ab2
8 changed files with 118 additions and 18 deletions

View File

@@ -32,7 +32,7 @@ setopt autocd
BUFFER=$'/bin; /bin'
expected_region_highlight=(
'1 4 path' # /bin (in middle)
'1 4 arg0' # /bin (in middle)
'5 5 commandseparator' # ;
'7 10 path' # /bin (at end)
'7 10 arg0' # /bin (at end)
)