Miscellaneous Configuration Scripts
- Introduction
- Bash/Zsh run-scripts
- Git configuration
- VS Code settings
- Git attributes
- Related projects
- Project Information
misc-config-scripts is a collection of configuration resources intended to be copied into Synesis and related projects or developer environments.
The resources cover shell startup, Git, VS Code, and GitHub-hosted repository attributes. Each resource has a canonical copy in this repository; consuming projects should record the relevant VERSION in their CHANGES.md when updating.
Sibling project: misc-dev-scripts (development and test-runner scripts).
- .commonrc (unix/.commonrc) is a basic .bashrc / .zshrc that:
- works with both
bashandzsh; - defines prompt (
PS1) that includes elements user-name, host-id, directory, and git-branch (if any) with terse status counts (+staged green,*changed cyan,?unknown/untracked red; branch yellow); - locates and, if exists, preloads /etc/bashrc;
- conditionally aliases:
cbtopbcopy(macOS) orclip(Windows);histtohistory(Bash) orhistory 0(Zsh);lddtootool -L(macOS);llto the most useful host-specificlsinvocation; andvitovim;
- loads environment variables from:
- $HOME/.common_environment_variables; and
- $HOME/.bash_environment_variables (Bash) or $HOME/.zsh_environment_variables (Zsh);
- sets
GOPATHwhen an appropriate directory is found; - supplements
PATHwith $HOME/.bin, $HOME/bin, and the Xcode developer-tools directory when present; - initialises
rbenvwhen found; - sources functions from *$HOME/.bin/fn_sh;
- configures history ignores (
HISTIGNOREin Bash andHISTORY_IGNOREin Zsh); and - loads the first available $HOME/.common_custom_rc, $HOME/.bash_custom_rc, or $HOME/.zsh_custom_rc.
- works with both
- .gitconfig (git/.gitconfig) is a drop-in for ~/.gitconfig with:
- aliases:
alias— list all aliases;br— list branches ordered by commit date;cb— obtain the current branch;ch,co, andcp— checkout, commit, and cherry-pick;dis,diss,diw, anddiww— staged and working-tree diffs with whitespace control;l,l1,l10,l20,l30,l40,l50,l60,la,lg,ln, andlogline— various forms oflog;meffandmsq— fast-forward-only and squash merges;puff— fast-forward-only pull;rev— verbose remotes;sl— detailed stash listing; andst— status;
masteras the default initial branch; andsimplepull behaviour.
- aliases:
Drop-in workspace settings are provided as .vscode/settings.json templates under settings.json/.
- Language-specific templates cover C, C++, C#, Go, JavaScript, Python, Ruby, Rust, and Zig;
- settings.json/generic/settings.json provides a union for mixed-language workspaces; and
- templates establish shared formatting, whitespace, ruler, and language-tooling preferences without machine-specific paths.
See settings.json/README.md for the template conventions, contents, and layout.
Drop-in root .gitattributes templates are provided under gitattributes/.
- Language-specific templates cover C, C++, C#, Go, JavaScript, Python, Ruby, Rust, and Zig;
- gitattributes/c_cxx/.gitattributes combines the C and C++ rules for mixed native-language projects;
- gitattributes/generic/.gitattributes provides a union of all language templates; and
- templates normalise text to LF, identify common binaries, configure language-aware diffs, and mark common generated build paths.
See gitattributes/README.md for the template conventions, sources, and usage.
A peer project providing development and test-runner scripts is misc-dev-scripts.
- VERSION — see VERSION;
- CHANGES — see CHANGES.md;
- NEWS — see NEWS.md;
- TODO — see TODO.md;
- License — BSD-3-Clause; see LICENSE.