Skip to content

Conversation

@meck
Copy link
Contributor

@meck meck commented Oct 28, 2025

If cat is aliased to bat the non piping operation
in the script might include extra text, use builtins instead

If cat is aliased to bat the non piping operation
in the script might include extra text, use builtins
instead
@khaneliman
Copy link
Collaborator

Should be able to use command cat instead if you want to force the real command and not use an alias.

@XYenon
Copy link
Member

XYenon commented Oct 29, 2025

I also set alias -- cat='bat -pp' but didn't encounter any issues

Copy link
Member

@XYenon XYenon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

However, reducing the launch of a new process is always good

@meck
Copy link
Contributor Author

meck commented Oct 29, 2025

Should be able to use command cat instead if you want to force the real command and not use an alias.

Yes, that works as well but i figured using bash/fish builtins is better, less processes...

I also set alias -- cat='bat -pp' but didn't encounter any issues

Yes, sorry about the issue not beeing clear I also have programs.bat.config.style = "numbers,changes"; so there is a config file when that makes bat produce line-numbers when not i a pipe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants