Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Case sensitivity inconsistency between --map-syntax and --language command line parameters #3175

Open
clach04 opened this issue Jan 11, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@clach04
Copy link

clach04 commented Jan 11, 2025

What steps will reproduce the bug?

  1. create a valid todo.txt file http://todotxt.org/ with a custom name, e.g. todo_2025-01.txt
  2. run bat --map-syntax "todo*.txt:todo.txt" todo_2025-01.txt
  3. run bat --map-syntax "todo*.txt:Todo.txt" todo_2025-01.txt
  4. run bat --language todo.txt todo_2024-12.txt

What happens?

number 2 will fail with:

[bat error]: unknown syntax: 'todo.txt'

What did you expect to happen instead?

I expected syntax highlighting in the same way that the language flag works.

  • It appears that the language flag is case insensitive.
  • It appears that the map-syntax flag is case sensitive.

How did you install bat?

download msvc zip from https://github.com/sharkdp/bat/releases/tag/v0.25.0 extract exe to path.


bat version and environment

C:\>bat --version
bat 0.25.0 (25f4f96)

C:\>bat --diagnostic

Software version

bat 0.25.0 (25f4f96)

Operating system

Windows 6.2.9200

Command-line

bat --diagnostic

Environment variables

BAT_CACHE_PATH=<not set>
BAT_CONFIG_PATH=<not set>
BAT_OPTS=<not set>
BAT_PAGER=<not set>
BAT_PAGING=<not set>
BAT_STYLE=<not set>
BAT_TABS=<not set>
BAT_THEME=<not set>
COLORTERM=<not set>
LANG=<not set>
LC_ALL=<not set>
LESS=<not set>
MANPAGER=<not set>
NO_COLOR=<not set>
PAGER=<not set>
SHELL=<not set>
TERM=<not set>
XDG_CACHE_HOME=<not set>
XDG_CONFIG_HOME=<not set>

System Config file

Could not read contents of 'C:\ProgramData\bat\config': The system cannot find the path specified. (os error 3).

Config file

Could not read contents of 'C:\Users\clach04\AppData\Roaming\bat\config': The system cannot find the path specified. (os error 3).

Custom assets metadata

Could not read contents of 'C:\Users\clach04\AppData\Local\bat\metadata.yaml': The system cannot find the path specified. (os error 3).

Custom assets

'C:\Users\clach04\AppData\Local\bat' not found

Compile time information

  • Profile: release
  • Target triple: x86_64-pc-windows-msvc
  • Family: windows
  • OS: windows
  • Architecture: x86_64
  • Pointer width: 64
  • Endian: little
  • CPU features: cmpxchg16b,fxsr,sse,sse2,sse3
  • Host: x86_64-pc-windows-msvc
@clach04 clach04 added the bug Something isn't working label Jan 11, 2025
@clach04
Copy link
Author

clach04 commented Jan 11, 2025

Thanks for making this tool available (and fd)!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant