mirror of
https://github.com/sharkdp/bat
synced 2026-07-20 16:33:20 +00:00
f49641a6c3
When a symlink name has no recognizable extension (e.g. Aliases/0install), syntax detection fails because the symlink path doesn't match any syntax. The target file may have a recognizable extension (e.g. Formula/zero-install.rb) but was never consulted. When path-based syntax detection fails with UndetectedSyntax, canonicalize the path to resolve symlinks and retry detection with the target path. This preserves existing behavior where the symlink path itself matches (e.g. .ssh/config), since the original path is tried first. Closes #1001