Skip to content

SaeedHurzuk/bashrc_updater

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Useful Unix Aliases 🌟

A collection of handy Unix aliases and helpers for macOS and Linux.
Simplify your workflow, keep your shell clean, and make everyday tasks faster.


Features

  • Portable .bashrc installer for macOS and Linux
  • Automatic backup and rollback of existing configurations
  • macOS LaunchAgent integration to auto-load .bashrc
  • CLI with options for dry-run, force overwrite, verbose, and quiet mode
  • Update checker via GitHub or Gitea for easy version control

Installation

Run the installer in the current shell (dot sourcing) to immediately apply aliases:

# Run installer in current shell
. ./update_aliases.sh -i
# Chmod file
chmod +x update_aliases.sh
# Run installer
./update_aliases.sh

Install for a Specific User

# Replace 'username' with your target user
. ./bashrc_updater/update_aliases.sh -i -t username

Dry Run (Preview Actions)

# Show what would happen without making changes
. ./bashrc_updater/update_aliases.sh -i -n

Check for Updates

. ./bashrc_updater/update_aliases.sh -u

CLI Options

Option Description
-i, --install Install .bashrc and repo files
-u, --update Check for updates (WIP)
-t, --target-user USER Install for a specified user
-f, --force Force overwrite of existing files
-n, --dry-run Preview actions without making changes
-r, --rollback PATH Restore the latest backup of a file
-V, --verbose Enable debug output
-q, --quiet Suppress info messages
-v, --version Print script version
-h, --help Show help

Backup & Rollback

The script automatically creates timestamped backups before overwriting .bashrc or other config files.

# Restore the latest backup for a specific file
. ./bashrc_updater/update_aliases.sh -r /path/to/file

Contributing

Contributions are welcome! You can:

  • Submit new aliases
  • Improve documentation
  • Add OS-specific enhancements

License

MIT License


Tips

  • Always dot source the script (. ./update_aliases.sh) to ensure your shell environment updates immediately.
  • For macOS users, the script automatically configures a LaunchAgent to load .bashrc at login.
  • Use -q (quiet) when running automated setups to suppress output.
  • Customize .bashrc before installation if you want to pre-load your favorite aliases.

About

A small CLI tool to programmatically update a repository’s ~/.bashrc (Unix/MacOS) — apply templates or snippets, commit the change, and optionally push or open a pull request.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages