diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..a4761e6 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,27 @@ +# EditorConfig is awesome: https://EditorConfig.org + +# top-most EditorConfig file +root = true + +[*] +charset = utf-8 +end_of_line = lf +# The POSIX standard requires the last line to end with a new line character. +# All UNIX tools expect a new line at the end of files. Most text editors use this convention too. +insert_final_newline = true +trim_trailing_whitespace = true +max_line_length = 120 + +# Matches multiple files with brace expansion notation +# Set default charset and 4 space indentation +[*.{py,txt,md,rst,c,cxx,cpp,h,hpp,hxx,sh,cfg,ini}] +indent_style = space +indent_size = 4 + +[*.{js,json,html,htm,xml,yaml,yml}] +indent_style = space +indent_size = 2 + +# Tab indentation (no size specified) +[{Makefile,*.go}] +indent_style = tab diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..38ea467 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,22 @@ +# AGENTS.md - Repository Guidelines for Agentic Coding + +## Build & Development Commands +- `make help` - Show all available targets +- `make dist` - Create source distribution in dist/ +- `make rpm` - Build RPM package +- `make podman_rpm` - Build RPM using podman (for MacOS) +- `make changelog` - Add changelog entry via ./changelog.sh +- `make clean` - Clean generated files +- Pre-commit hooks run automatically on commit (see .pre-commit-config.yaml) + +## Code Style Guidelines +- **Shell Scripts**: Use bash syntax, source-safe with `${BASH_SOURCE-}` guard +- **File Permissions**: profile.d scripts must be 0644 (install -m 0644) - they are sourced, not executed +- **Line Endings**: LF only (enforced by pre-commit, see .editorconfig) +- **No trailing whitespace** (enforced by pre-commit, see .editorconfig) +- **Error Handling**: Use `command -v` instead of `which` for portability +- **OS Compatibility**: Support both Linux and MacOS with conditional logic +- **Naming**: Profile.d files use `z-.sh` pattern for alphabetical loading +- **Licensing**: The Unlicense unless explicitly stated otherwise +- **Indentation**: 4 spaces for shell scripts (see .editorconfig) +- **Large Files**: Max 64KB (enforced by pre-commit) diff --git a/etc/profile.d/ssh_controlmasters.sh b/etc/profile.d/ssh_controlmasters.sh old mode 100755 new mode 100644 diff --git a/etc/profile.d/z-aliases.sh b/etc/profile.d/z-aliases.sh old mode 100755 new mode 100644 diff --git a/etc/profile.d/z-env.sh b/etc/profile.d/z-env.sh old mode 100755 new mode 100644 diff --git a/etc/profile.d/z-ps-twtty-7.sh b/etc/profile.d/z-ps-twtty-7.sh old mode 100755 new mode 100644 diff --git a/etc/profile.d/z-time_style.sh b/etc/profile.d/z-time_style.sh old mode 100755 new mode 100644