Skip to content

Compatibility with POSIX cat for files named "cache" #245

@muendelezaji

Description

@muendelezaji

First, thanks for this very useful utility. This is not really a bug at this point since it appears to be a design choice (#82), but thought it would be nice to get clarification on this.

bat treats files named cache (and previously, init-cache) as a subcommand and fails when it's the first argument. Granted this only happens when the file appears first AND is in the current directory, so probably not a big deal. But it does mean this just misses being a drop-in replacement for cat (esp. in non-interactive scenarios) and potentially breaks POSIX compliance (only - is a special filename). I see there's also talk on adding more subcommands on #23 which would depart further from compatibility.

In following on the project goals, is there any good way around this? Perhaps by using --cache-X or other approach.

Edit: Linking to POSIX compliance issue – #134

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions