Skip to content

Bash syntax error. #1138

Open
Open
@Thell

Description

@Thell

I'm not sure if this is even something that'd be reported to bat or to a used lexer or ... ?

What version of bat are you using?
bat 0.12.1

Describe the bug you encountered:
Incorrect interpretation of tokens.

image

Describe what you expected to happen?
Any word delimiter should be interpreted as valid.
Bash Manual § Here-Documents
Any word starting starting after <<[-][:space:][\] until [:space:] or newline.
So : << \*** # Comment would have a matching word of *** and # Comment would be a comment, but most lexers miss that part.

How did you install bat?
apt-get

---

 Ubuntu  ~  $  . ./info.sh
system
------

**$ uname -srm**
Linux 4.19.104-microsoft-standard x86_64

**$ lsb_release -a**
No LSB modules are available.  
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.1 LTS
Release:        20.04
Codename:       focal

bat
---

**$ batcat --version**
bat 0.12.1

**$ env**

Command 'bat' not found, but can be installed with:

sudo apt install bacula-console-qt


bat_config
----------

bat_wrapper
-----------

No wrapper script for 'bat'.

No wrapper script for 'batcat'.

bat_wrapper_function
--------------------

No wrapper function for 'bat'.

No wrapper function for 'cat'.

No wrapper function for 'batcat'.

tool
----

**$ less --version**
less 551 (GNU regular expressions)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions