Skip to content

Conversation

@VlaDexa
Copy link
Contributor

@VlaDexa VlaDexa commented Jun 2, 2025

Just ran the suggested formatter at the top of PKGBUILD

@Jaja83
Copy link
Collaborator

Jaja83 commented Aug 2, 2025

Which "suggested formatter" do you mean?
While I think for most domains the world has settled now with use of space as indentation instead of tabs for the better, it is seemingly only a matter of taste how many whitespace is used. My editor setting is 2, by choice.

I have no opinion about this PR to be merged, because it is random choice..
But would be nice to speculate instead why historically 8 chars have been used as substitute for \t. Found nothing on the web that holds true here..

@VlaDexa
Copy link
Contributor Author

VlaDexa commented Aug 2, 2025

Which "suggested formatter" do you mean?

## Formated using:
## $ shfmt -w PKGBUILD

would be nice to speculate instead why historically 8 chars have been used as substitute for \t.

I imagine that it's a rather random choice by someone, as it often is with these things. But it fits in the power of two theory from the wikipedia page on the Tab key

@Jaja83
Copy link
Collaborator

Jaja83 commented Aug 2, 2025

But it fits in the power of two theory from the wikipedia page on the Tab key

Feels more than natural - only power of two looks right. But have you seen the 7 bit ASCII table broke up the right way in 4:3 pane? Escape sequences suddenly make perfect sense, fitting long gone architectures with odd register size.

$ shfmt -w PKGBUILD

Some other contributor did formatting here some time ago, and that's fine.
But the thing is that you can have a config file for the tool and get different results. Could be in the repo, but then again you can have it set up differently locally. There is "Trunk" to solve that issue in a generic way.. Formatter config and version got fixed and end up being committed withn the repo. Sounds nice, but is absolute overkill.
VIM would nicely put a line of config to the file itself defining tab stop, but that's not understood by other editors. What a shame..

@Technetium1
Copy link
Member

I imagine that it's a rather random choice by someone, as it often is with these things.

It is definitely not random, it's the intended method for Chaotic-AUR. It's used the same way when adding packages, and enforced with a pre-commit check. See also the mention within the development environment setup.

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants