This project is not under active development and was superseded by my dotfiles.
This is my collection of useful shell scripts for Linux (ubuntu-latest) and Mac (macos-latest).
To install all the scripts, run:
make dependencies symlink
To uninstall all the scripts, you can run:
make unsymlink
git-bump --help
Bump the current tag version to the next version according to the semantic
versioning specifications
Usage: git-bump [OPTIONS] --level <RELEASE_LEVEL>
Arguments:
-l, --level <RELEASE_LEVEL>
The release level to bump tag [possible values: patch, minor, major]
Options:
-m, --message <MESSAGE>
Optional tag message
-d, --dry-run
Prints the next version without committing anything
-h, --help
Print help information (use `-h` for a summary)
Examples:
git-bump -l patch -m "version %T"
git-bump -l minor -d
git-bump -l major
pfmt --help
Format plain text with sd.
Usage:
pfmt [OPTIONS] <FILES>...
pfmt [OPTIONS] <<(echo <TEXT>)
Arguments:
<FILES>...
A list of space-separated FILES as positional arguments, or
<TEXT>
A TEXT from standard input
Options:
-h, --help
Print help information (use `-h` for a summary)
Formatting Rules:
- Enforce a single space between words.
- Remove spaces between words and punctuation.
- Add only one space between punctuation and words.
- Remove spaces surrounding words inside square brackets, brackets, and parentheses.
- Trim the spaces at the end of the line.
- Add double spaces between sentences.
Examples (positional arguments):
find . -type f -name "*.md" | xargs pfmt
pfmt *.md
Examples (standard input):
pfmt <<(echo "some text to format ...")
cat README.md | pfmt
echo "some text to format ..." | pfmt
-
fm
- Filter and transform text and files accordingly predefined regex rules. -
git-bump
- Bump the current tag version to the next version accordingly to semantic versioning specifications. -
git-dirty
- Recursively check your local git repositories for unstaged files. -
git-changelog
- Recursively generate CHANGELOG files for your git repositories. -
pfmt
- Format plain text with sd.
Completions for each script are available for the zsh
shell in the
complete directory.
To enable shell completion, copy the files to one of your $fpath
directories.
make help
all-check Run all checks
dependencies Install dependencies
fmt-check Check format bash code
fmt Format bash code
help Display this help screen
lint-check Check lint bash code
readme Write README.md
symlink Add symlink to scripts in path
tests Tests utilities
typos Check typos
typos-fix Fix typos
unsymlink Remove symlink to scripts from path
- Bash Reference Manual
- Bash script setup
- Use Bash Strict Mode (Unless You Love Debugging)
- How "Exit Traps" Can Make Your Bash Scripts Way More Robust And Reliable
- How can I read a file (data stream, variable) line-by-line (and/or field-by-field)?
- Obsolete and deprecated syntax
- Portability talk
- Using Trap to Exit Bash Scripts Cleanly
- Bash | Tips & Tricks I would have wanted to know when I started