Skip to content
This repository has been archived by the owner on Aug 26, 2024. It is now read-only.
/ bash-utils Public archive

This is my collection of useful shell scripts for Linux (ubuntu-latest) and Mac (macos-latest).

License

Notifications You must be signed in to change notification settings

rodmoioliveira/bash-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IMPORTANT!

This project is not under active development and was superseded by my dotfiles.

bash-utils

Makefile CI

This is my collection of useful shell scripts for Linux (ubuntu-latest) and Mac (macos-latest).

index

installation

To install all the scripts, run:

make dependencies symlink

To uninstall all the scripts, you can run:

make unsymlink

scripts descriptions

git-bump

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

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

future scripts

  • 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

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 recipes

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

style

reference

About

This is my collection of useful shell scripts for Linux (ubuntu-latest) and Mac (macos-latest).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published