2 ms·
Google's Shell Style Guide
- kolev 12y agoI've been using the same already without knowing about this, but with a few exceptions. Most notably, I indent with tabs, because I can use a heredoc with tabs, i.e. hello() { cat <<-MSG Hello, world! MSG } Here, I have tabs before "Hello, world!" and those are ignored by Bash. I also have tabs before MSG, i.e. I don't need to start the line with it, which would be pretty ugly. I understand the rationale about not using tabs, but I think tabs are needed for more readable code.