DEV Community

Discussion on: What are your preferred bash aliases?

Collapse
 
moopet profile image
Ben Sinclair • Edited

Use null to zero/create a file

I'd do :> foo to do this (well, I use :>| foo because I have noclobber set, but...)

As for needing to output ls without colour, I think color=auto works for most colour-aware commands in that you get colours, but they're suppressed if the output's to a pipe. That should cover most cases?

Collapse
 
thefluxapex profile image
Ian Pride

The reason why I originally created that alias is because at some point, for whatever glitched reason, I couldn't force colors off and that was the only way I could force it off. Don't remember exactly what it was; it's been a few years and my memory has been slipping lately.